When my EA closes my trades on live trading mode, I get FIFO violation messages because my older orders are not being closed first. Is there a way to close all open orders in one trade instead of one at a time? It seems time consuming when only one order is closed at a time. I would like to be able to close all my open orders at one price level instead of one at a time which results in multiple price levels. If its not possible to close all open orders in one trade, would fixing the order closing process, older orders being closed first in order to avoid the FIFO violation messages, speed up the closing process? Even though I get the FIFO violation messages, the orders do get closed. Any advice would be great. Here is the closing criteria from my EA:
- Errors, bugs, questions
- HOW TO close pending orders OLDER than x hours.
- FOREX - Trends, forecasts and implications 2016
fxtrader86:
When my EA closes my trades on live trading mode, I get FIFO violation messages because my older orders are not being closed first. Is there a way to close all open orders in one trade instead of one at a time? It seems time consuming when only one order is closed at a time. I would like to be able to close all my open orders at one price level instead of one at a time which results in multiple price levels. If its not possible to close all open orders in one trade, would fixing the order closing process, older orders being closed first in order to avoid the FIFO violation messages, speed up the closing process? Even though I get the FIFO violation messages, the orders do get closed. Any advice would be great. Here is the closing criteria from my EA:
No, you have to close them one at a time and you have to close the oldest first, find the oldest by OrderOpenTime() and close it, then find the next, etc.
When my EA closes my trades on live trading mode, I get FIFO violation messages because my older orders are not being closed first. Is there a way to close all open orders in one trade instead of one at a time? It seems time consuming when only one order is closed at a time. I would like to be able to close all my open orders at one price level instead of one at a time which results in multiple price levels. If its not possible to close all open orders in one trade, would fixing the order closing process, older orders being closed first in order to avoid the FIFO violation messages, speed up the closing process? Even though I get the FIFO violation messages, the orders do get closed. Any advice would be great. Here is the closing criteria from my EA:
I have never heard of this rule, so I googled it.
Is this just with American brokers?
From what I see, with open orders of the same size on the same currency pair, oldest must be closed first.
Not clear whether longs and shorts are considered separately .
This could really mess things up when running an EA in different time-frames with the same pair.
Yes that's with American traders. Some brokers took the change literally. Some forced the SL/TP to be most restrictive of the oldest. Some implemented the FIFO rule in their back office accounting and did not break the MT4 model.
American traders can not hedge either - there are no "longs and shorts"

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register