Button on Backtesting
Can you make the default Indicators work ? like the Default MA and the MACD ?
Thats the first thing to try. Can be a little complicated and theres some Youtbube videos to show you
MT4 or MT5
Both if possible!
Thank you so much!
Both if possible!
Thank you so much!
Objects placed on chart in visual backtesting MT4 don't raise events, but when you push button it will change its state. You can simply check its state in OnTick function:
bool button_state = ObjectGetInteger(ChartID(), button_name, OBJPROP_STATE);
and do proper action (the same as in OnChartEvent function):
if (button_state) { // do action // restore prev. state ObjectSetInteger(ChartID(), button_name, OBJPROP_STATE, false); }
In MT5 this is more complicated.
Hello,
Does anyone know how to make the button work on backtesting?
Thank you.