Does anyone know how to test EA for binary options on mt4 strategy tester with one of these brokers CoreLiquidityMarkets or Grand capital ( they have binary options based on mt4) ?
Thank you in advance :)
I had a method to back test my binary option EA by using an expiry time to close the order after a time I specified. I did this using Order = SIGNAL_CLOSEBUY or SIGNAL_CLOSESELL.
You have to set the backtest spread to 1 so not a true 0 spread you would get with BO but it can give you an idea.
extern int expirytimelong = 15;extern int expirytimeshort = 15;
int timedifflong = expirytimelong * 60; // 60 = 1 minsint timediffshort = expirytimeshort * 60; // 60 = 1 mins
Closing the Orders
if (TimeCurrent() - OrderOpenTime() > timedifflong) Order = SIGNAL_CLOSEBUY;
Hope this helps :-)
Add this to code. Set on single pair and set tester_close=true
Your code is useless. have not resutl of trategy.
below is result if use virtual order and write to file.