regardless to your issue
martingale is a very dangerous strategy it can wipe you out
Dear guys
I create a button. it work on very well. but it is not work on backtest. I don't know why. can anyone tell me how button work on backtest on visual mode.
Thanks
You have to check the button state :
ObjectGetInteger(chart,objname,OBJPROP_STATE);
Which can only be done in OnTick() with the Strategy Tester, as other events (OnTimer, OnChartEvent) are not working.
Buttons are working in visual backtest. It's chartevent event handler which is not working.
Thanks for the clarification. Do you know whether this is something that MQL are going to fix?
I've been putting off converting all my Buttons from MT4GUI to the new MQL code for this very reason (as well as the lack of ENUM_BORDER_TYPE for Buttons), and I'm still not sure whether it is worth creating the code for OnTick and OnChartEvent so that they will also work when back testing.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Dear guys
I create a button. it work on very well. but it is not work on backtest. I don't know why. can anyone tell me how button work on backtest on visual mode.
Thanks