Button on Backtesting

To add comments, please log in or register
rucope
158
rucope  

Hello,

Does anyone know how to make the button work on backtesting?

Thank you.

Ahmad Zuhairdi Noh
6105
Ahmad Zuhairdi Noh  
rucope:

Hello,

Does anyone know how to make the button work on backtesting?

Thank you.

Umm, button does work in backtesting. At least in MT4. 

rucope
158
rucope  
Ahmad Zuhairdi Noh:

Umm, button does work in backtesting. At least in MT4. 

Thank for your answer.

However, I already saw an EA used button on backtest.

I think we can make it work.

But how to make it!!!!!!

AdrianSmith
146
AdrianSmith  
Try in on freelance!
Fred7777
238
Fred7777  

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

Dmitriy Gizlyk
20791
Dmitriy Gizlyk  
rucope:

Hello,

Does anyone know how to make the button work on backtesting?

Thank you.

MT4 or MT5
AdrianSmith
146
AdrianSmith  
Fred7777:

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

Can you share the links?
rucope
158
rucope  
Dmitriy Gizlyk:
MT4 or MT5

Both if possible!

Thank you so much!

InvestSoft
15338
Janusz Trojca  
rucope:

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.

To add comments, please log in or register