Possible to programmatically change chart symbol by script/EA?

Back to topics list To post a new topic, please log in or register
avatar
705
1005phillip 2010.05.28 23:49
 

Searching for this mostly resulted in a slew of like-minded posts that went unanswered a year or two ago...but on the off chance someone has since figured out a way to do this (or knows for certainty it cannot be done) I figured I'd pose the question.

Is there a way to setup a script or EA attached to a live chart which can change the symbol used for the chart?

 
avatar
416
cameofx 2010.05.29 08:55 #
 
Phillip, don't know if this fits your need. But have you tried Auto-flip Chart script. I have it at home but I can't remember the post. Googling it didn't locate where I had found it. It's a short script that flip/rotate between charts every x seconds you specify. Maybe others can recall where. hth.
 
avatar
2025
gordon 2010.05.29 09:09 #
 
cameofx:
[...] Maybe others can recall where. hth.

https://forum.mql4.com/29660

avatar
416
cameofx 2010.05.29 09:20 #
 
Holy crap Batman! It's right there & by Jjc! I googled & vaguely remember downloading it on other forum.
What would this forum be without you & your archives gordon :))
 
avatar
705
1005phillip 2010.05.30 08:45 #
 

Thanks for the link gordon, I would not have ever thought to narrow my search keywords down to "flipping charts". How the heck do you keep track/remember all these links? :P At any rate, good on ya! This will work perfectly.

 
avatar
1
pitfade 2012.11.06 14:18 #
 

Hello,

I am looking for a script or EA which changes all Symbols of all open charts on MT4.

I would like to display 6 charts of one Symbol in different timeframes.

When I get a signal on my other computer, I would like to change the Symbols in MT4 fast to the symbol of the signal.

So I get an overview of the situation of the pair (MN, W, 240, 60, 5, 1).

Actual I use Esignal where the charts are linked to the symbols, but it is too expensive.

Thanks for answer


Pit

 
avatar
2
sergiome35 2016.02.29 13:54 #
 
pitfade:

Hello,

I am looking for a script or EA which changes all Symbols of all open charts on MT4.

I would like to display 6 charts of one Symbol in different timeframes.

When I get a signal on my other computer, I would like to change the Symbols in MT4 fast to the symbol of the signal.

So I get an overview of the situation of the pair (MN, W, 240, 60, 5, 1).

Actual I use Esignal where the charts are linked to the symbols, but it is too expensive.

Thanks for answer


Pit

Use this script:

 

 

input string   newSymbol;

input bool     upperCase=true;

input bool     lowerCase=false;

//+------------------------------------------------------------------+

//| Script program start function                                    |

//+------------------------------------------------------------------+

void OnStart()

{

//---

   string s=newSymbol;

     

   if (upperCase)

      StringToUpper(s);

   else if (lowerCase)

      StringToLower(s);


   for (long i = ChartFirst(); i!=-1; i = ChartNext(i))

   {

      ChartSetSymbolPeriod(i,s,ChartPeriod(i));

   }

 

 

Back to topics list  

To add comments, please log in or register