I want a EA for binary options.
I would like the MqlTraderRequest expirate every period. I don't need takeprofit or stoploss for trigger the order.
mrequest.action = TRADE_ACTION_PENDING;
mrequest.price = NormalizeDouble(latest_price.bid,_Digits);
mrequest.sl = NormalizeDouble(latest_price.bid + STP*_Point,_Digits);
mrequest.stoplimit = NormalizeDouble(latest_price.bid + STP*_Point,_Digits);
mrequest.tp = NormalizeDouble(latest_price.bid - TKP*_Point,_Digits);
mrequest.symbol = _Symbol;
mrequest.volume = Lot;
mrequest.magic = EA_Magic;
mrequest.type_filling = ORDER_FILLING_FOK;
mrequest.type_time = ORDER_TIME_SPECIFIED;
mrequest.expiration = TimeTradeServer()+PeriodSeconds(PERIOD_M1);
This struct give errors always. I have tried different combinations for action, type_time, expiration... but no way.
Which MT5 broker provides you binary options ? I thought it was not available for MT5.
Anyway, you can't certainly not use a pending order for binary option.