hit order rate limit

 

Hello,

I run into “hit order rate limit” issue, below you may read some specifics:

If conditions are right my EA/MT4 starts to build up/open pool of orders by small portions (0.01 lots) every 5...1 minute; all open orders in pool are Market orders with slightly different market prices and slightly different SL/TP. 

My broker provided the listing which represents the issue (below is the fragment):

//------------------

'104465': instant buy 0.02 GBPUSD.FX at 1.29460 sl: 1.19736 tp: 1.48908 (1.29448 / 1.29458)

'3': request from '104465' (buy 0.02 GBPUSD.FX at 1.29460 sl: 1.19736 tp: 1.48908)

'3': confirm '104465' buy 0.02 GBPUSD.FX at 1.29460 sl: 1.19736 tp: 1.48908 (1.29448 / 1.29458)

'104465': DFE requestId=MTR01I8SF0RP1L confirmed (no hedge)

'104465': modified #30641480, buy 0.01 GBPUSD.FX at 1.29525, sl: 1.19736 tp: 1.48908 due #30641713

'104465': modified #30641551, buy 0.02 GBPUSD.FX at 1.29487, sl: 1.19736 tp: 1.48908 due #30641713

'104465': modified #30641589, buy 0.02 GBPUSD.FX at 1.29485, sl: 1.19736 tp: 1.48908 due #30641713

'104465': modified #30641595, buy 0.02 GBPUSD.FX at 1.29476, sl: 1.19736 tp: 1.48908 due #30641713

'104465': modified #30641666, buy 0.02 GBPUSD.FX at 1.29437, sl: 1.19736 tp: 1.48908 due #30641713

'104465': modified #30641704, buy 0.02 GBPUSD.FX at 1.29449, sl: 1.19736 tp: 1.48908 due #30641713

'104465': order #30641713, buy 0.02 GBPUSD.FX at 1.29460

'104465': open order #30641713 modified by API

'104465': open order #30641713 modified by API

//----------------

Since OrderModify is not called anywhere in the EA so, the issue appears to be that every new open order (by OrderSend) changes SL/TP of all already open orders; therefore, every new open order triggers the massive number of requests to modify SL/TP of all already open orders so, the number of requests grows geometrically from the number of open orders.

Therefore, currently I face an unexpected hypothesis:

SL/TP is not the property of specific order but rather the property of chart of EA it is assigned, thus SL/TP is common for all orders from the same chart.

Such possibility does not look right and probably the issue is somewhere else yet, to make sure that it is not the case I look for inputs from more experience with EA/MT4 people.

I would really appreciate any help.

Stephan

 
stefanbanev: SL/TP is not the property of specific order but rather the property of chart of EA it is assigned, thus SL/TP is common for all orders from the same chart.

Wrong. Has nothing to do with your code or the terminal, nor is it a property of the chart — each SL/TP is independent of the others.

It is because of FIFO — in order to insure your oldest order is closed first, your broker makes all SL/TP the same. Thank your moronic politicians that broke the MT4 model.

Since 2009, hedging is not permitted for US traders.
          NFA Enforces FIFO Rule, Bans Forex Hedging in US Forex Accounts - Trading Heroes
          FAQ: FIFO in the Forex Market - BabyPips.com

Reason: