How to open a chart?
-
How can I create a custom code to open a particular chart? MQL provides the following function but I am not sure how to use it on fxdreema
ChartOpen
Opens a new chart with the specified symbol and period. The command is added to chart message queue and executed only after all previous commands have been processed.long ChartOpen(
string symbol, // Symbol name
ENUM_TIMEFRAMES period // Period
); -
-
It works. Thank you
-
@fxdreema si solo pongo Chartopen(PERIOD_M15, PERIOD_M30, PERIOD_H1); una vez coloque el ea, abrira esos tf del par donde coloque el ea?
-
@Jaico, this will not work. This is the definition of ChartOpen() - https://www.mql5.com/en/docs/chart_operations/chartopen As you can see, it accepts only 2 parameters. You can run it multiple times if you want:
ChartOpen("EURUSD", PERIOD_M15); ChartOpen("EURUSD", PERIOD_M30); ChartOpen("EURUSD", PERIOD_H1);To to that on the current symbol, use Symbol() instead of "EURUSD"
ChartOpen(Symbol(), PERIOD_M15); ChartOpen(Symbol(), PERIOD_M30); ChartOpen(Symbol(), PERIOD_H1); -
@fxdreema gracias funciona perfecto , y si en esos graficos quiero que salgo mi ea con la misma configuaracion,
como debo ponerlo? -
This function only opens another charts, I don't know how to add EAs to them
