Topic: Expert Adviser errors

? I enabled an FSB expert and I'm getting the following messages on the MT4 expert tag. What does it mean


2015.08.27 08:11:21.686    EURUSD 1 Min S! Haim EURUSD,M1: Error with ClosePositionByTicket: prohibited by FIFO rules. Attempt No: 4
2015.08.27 08:11:21.530    EURUSD 1 Min S! Haim EURUSD,M1: Error with ClosePositionByTicket: prohibited by FIFO rules. Attempt No: 3
2015.08.27 08:11:21.374    EURUSD 1 Min S! Haim EURUSD,M1: Error with ClosePositionByTicket: prohibited by FIFO rules. Attempt No: 2
2015.08.27 08:11:21.203    EURUSD 1 Min S! Haim EURUSD,M1: Error with ClosePositionByTicket: prohibited by FIFO rules. Attempt No: 1


,Thanks

Re: Expert Adviser errors

FIFO means First In First Out. In English - the first open position must be closed first.
This rule become mandatory for the US forex brokers several years ago. FSB and the exported Expert Advisers are fully compatible with that rule.

FIFO is turned on by default in the EA (line 83)


// FIFO (First In First Out) forces the expert to close positions starting from
// the oldest one. This rule complies with the new NFA regulations.
// If you want to close the positions from the newest one (FILO), change the variable to "false".
// This doesn't change the normal work of Forex Strategy Builder.
bool FIFO_order=true;

The FIFO rule influences strategies that uses adding. It can be also taken into account when you trade several experts on the same symbol.

Can you give more details for your broker and how many experts do you trade on the same symbol?

You can find more info by Googling "Forex FIFO rule".

3 (edited by imasri 2015-08-27 17:14:27)

Re: Expert Adviser errors

Hi Popov,

I'm trading with FXCM and I've enabled a EURUSD 1 and 5 minute bar strategies.  My plan is to trade multiple strategies on the same symbol.  How does FSB handle closing positions from other experts running on the same symbol ?  It would seem that I would be limited to trading one experts per symbol.

Thanks

Re: Expert Adviser errors

It would seem that I would be limited to trading one experts per symbol.

According to the NFA rules the hedging is forbidden, therefore you have  to use one EA for the USA brokers. The problem is that two or more experts can open trades in different direction or close their trades at anytime contrary to the FIFO rules.

There are good European brokers that allow hedging without problems.

http://s28.postimg.org/xw8pwmk09/screenshot_1176.jpg