When changing TakeProfit for 1 out of 3 tickets opened via script all 3 are changed

 
Hello Experts I modified a script I found on these forum to open 3 trades at the same time (I am interested on open all tickets at same entry price) - (code attached). Initially the 3 tickets are opened with StopLoss defined but no TakeProfit (=0). I notice that eveytime I change either TakeProfit or StopLoss any one of them, all others are changed also! I don't want this to happen, I want be able to define different TakeProfit and StopLoss price for each one of them. Does anyone have an idea why this is happening and how can I define TakeProfit/StopLoss independently? I am using MT4 ver4.0 build 482 from FXCM. Thank you for help Rafael
 

Hello Experts,

I founf this issue is not related to the fact I opened trades using script: I opened manually 3 trades on same symbol and same sympton happened (eveytime I change either TakeProfit or StopLoss any one of them, all others are changed also to same value).

Any idea why this happen?

 
rafo05:

Hello Experts,

I founf this issue is not related to the fact I opened trades using script: I opened manually 3 trades on same symbol and same sympton happened (eveytime I change either TakeProfit or StopLoss any one of them, all others are changed also to same value).

Any idea why this happen?

Nope,  maybe you are running an EA that changes all the TPs/SLs at the same time ?  

Or it may be part of the Sever side software screwup related to Build 482 . . .

 

Hi RaptorUK

I suspect it is something related either with build 482 or with Demo-server, 'cause there is no EA at all running on MT4

I wrote on FXCM MT$ Forum... let's see if anyone replys 

 
rafo05: eveytime I change either TakeProfit or StopLoss any one of them, all others are changed also to same value

In the US, NAFTA rules now state that the oldest order must be closed first.

Some brokers (like IBFX) implemented this rule in the back office side, so accounting statements don't match the mql4 statements (P/L correct when all are closed) but the mql4 model wasn't broken.

Others implemented this rule by forcing the oldest order to have the closest TP/SL of all orders so that oldest order is closed first, per the rule. This breaks the mql4 model but accounting matches.

 
rafo05:

Hello Experts,

I founf this issue is not related to the fact I opened trades using script: I opened manually 3 trades on same symbol and same sympton happened (eveytime I change either TakeProfit or StopLoss any one of them, all others are changed also to same value).

Any idea why this happen?

Your broker may be enforcing the FIFO (First In, First Out) rule.  I live in the US and use a broker that operates both in the US and internationally.  US brokers are (unfortunately) required by US law to enforce the FIFO rule.  The behavior you are describing is how my broker enforces the FIFO rule.  If I open two trades on the same symbol in the same direction, they will have the same stoploss and takeprofit values.  Example: if I buy eur/usd at 1.30000 and set the stoploss at 1.29000 and set the takeprofit at 1.31000, and then I execute a second trade that buys the eur/usd at 1.30500 and set the stoploss at 1.30200 and takeprofit at 1.31500, both trades with have the same stoploss and takeprofit values once the second trade executes.  The first trade inherits the second trade's stoploss and takeprofit values.  If I change one, both trade's values change.  I sent an email to my broker asking why (even though I figured it was due to FIFO), and my broker confirmed that the behavior was due to their enforcement of FIFO rules.  The broker you mentioned has a US office and international offices, so you probably need to contact it to ask why you are experiencing that behavior, especially if you don't live in the US or aren't a US citizen.

 

EDIT #1:

WHRoeder beat me to the possible answer (I was writing mine while he posted his).  :) 

 

Hi ALL

You were right. These behaviour was because demo account was created under FXCM's USD-DemoServer and was following that FIFO rule WHRoeder and Thirteen mentioned. I opened another demo account on FXCM's GBP-DemoServer and I am able to set different TP/SL for each trade.

Thank you all for comments

Reason: