Adding 2 orders in "rapid" succession not working as planned New comment Ingvar Engelbrecht 2012.01.08 01:13 Running Strategy Tester.I place 2 trades in succesion for the same pair. The only difference is the takeprofit level. In the Journal the result is:2012.01.08 00:05:50 Core 1 2011.09.21 21:35:40 order performed buy 1.00 at 1.00818 [#4 buy 1.00 AUDUSD at 1.00818] <-------------------------------1.0 lot2012.01.08 00:05:50 Core 1 2011.09.21 21:35:40 deal performed [#4 buy 1.00 AUDUSD at 1.00818]2012.01.08 00:05:50 Core 1 2011.09.21 21:35:40 deal #4 buy 1.00 AUDUSD at 1.00818 done (based on order #4)2012.01.08 00:05:50 Core 1 2011.09.21 21:35:40 take profit triggered sell 1.00 AUDUSD 1.02749 tp: 1.00818 [#4 buy 1.00 AUDUSD at 1.00818]2012.01.08 00:05:50 Core 1 2011.09.20 14:00:00 Trade Entered Short Enter: 0.00000 TP: 1.00818 SL 0.000002012.01.08 00:05:50 Core 1 2011.09.20 14:00:00 Order placed Ticket: 3 TradeID: AUDUSD9201112012.01.08 00:05:50 Core 1 2011.09.20 14:00:00 order performed sell 0.50 at 1.02749 [#3 sell 0.50 AUDUSD at 1.02749]2012.01.08 00:05:50 Core 1 2011.09.20 14:00:00 deal performed [#3 sell 0.50 AUDUSD at 1.02749]2012.01.08 00:05:50 Core 1 2011.09.20 14:00:00 deal #3 sell 0.50 AUDUSD at 1.02749 done (based on order #3)2012.01.08 00:05:50 Core 1 2011.09.20 14:00:00 instant sell 0.50 AUDUSD at 1.02749 tp: 1.00818 (1.02749 / 1.02766 / 1.02749) <--------------------------------- 0.5 lot2012.01.08 00:05:50 Core 1 2011.09.20 14:00:00 Trade Entered Short Enter: 0.00000 TP: 1.01490 SL 0.000002012.01.08 00:05:50 Core 1 2011.09.20 14:00:00 Order placed Ticket: 2 TradeID: AUDUSD9201102012.01.08 00:05:50 Core 1 2011.09.20 14:00:00 order performed sell 0.50 at 1.02749 [#2 sell 0.50 AUDUSD at 1.02749]2012.01.08 00:05:50 Core 1 2011.09.20 14:00:00 deal performed [#2 sell 0.50 AUDUSD at 1.02749]2012.01.08 00:05:50 Core 1 2011.09.20 14:00:00 deal #2 sell 0.50 AUDUSD at 1.02749 done (based on order #2)2012.01.08 00:05:50 Core 1 2011.09.20 14:00:00 instant sell 0.50 AUDUSD at 1.02749 tp: 1.01490 (1.02749 / 1.02766 / 1.02749) <------------------------------- 0.5 lotWaht happens is that instead of taking the first takeprofit both trades end at the second profit by bying one lotIs there something I must do between the placing of the 2 trades so that they will be treated individually? Documentation on MQL5: Standard Constants, Enumerations and Structures / Trade Constants / Deal Properties www.mql5.com Standard Constants, Enumerations and Structures / Trade Constants / Deal Properties - Documentation on MQL5 Doubt on OnTrade() Strange stop loss execution Off quotes for pending orders New comment
Running Strategy Tester.
I place 2 trades in succesion for the same pair. The only difference is the takeprofit level. In the Journal the result is:
2012.01.08 00:05:50 Core 1 2011.09.21 21:35:40 order performed buy 1.00 at 1.00818 [#4 buy 1.00 AUDUSD at 1.00818] <-------------------------------1.0 lot2012.01.08 00:05:50 Core 1 2011.09.21 21:35:40 deal performed [#4 buy 1.00 AUDUSD at 1.00818]
2012.01.08 00:05:50 Core 1 2011.09.21 21:35:40 deal #4 buy 1.00 AUDUSD at 1.00818 done (based on order #4)
2012.01.08 00:05:50 Core 1 2011.09.21 21:35:40 take profit triggered sell 1.00 AUDUSD 1.02749 tp: 1.00818 [#4 buy 1.00 AUDUSD at 1.00818]
2012.01.08 00:05:50 Core 1 2011.09.20 14:00:00 Trade Entered Short Enter: 0.00000 TP: 1.00818 SL 0.00000
2012.01.08 00:05:50 Core 1 2011.09.20 14:00:00 Order placed Ticket: 3 TradeID: AUDUSD920111
2012.01.08 00:05:50 Core 1 2011.09.20 14:00:00 order performed sell 0.50 at 1.02749 [#3 sell 0.50 AUDUSD at 1.02749]
2012.01.08 00:05:50 Core 1 2011.09.20 14:00:00 deal performed [#3 sell 0.50 AUDUSD at 1.02749]
2012.01.08 00:05:50 Core 1 2011.09.20 14:00:00 deal #3 sell 0.50 AUDUSD at 1.02749 done (based on order #3)
2012.01.08 00:05:50 Core 1 2011.09.20 14:00:00 instant sell 0.50 AUDUSD at 1.02749 tp: 1.00818 (1.02749 / 1.02766 / 1.02749) <--------------------------------- 0.5 lot
2012.01.08 00:05:50 Core 1 2011.09.20 14:00:00 Trade Entered Short Enter: 0.00000 TP: 1.01490 SL 0.00000
2012.01.08 00:05:50 Core 1 2011.09.20 14:00:00 Order placed Ticket: 2 TradeID: AUDUSD920110
2012.01.08 00:05:50 Core 1 2011.09.20 14:00:00 order performed sell 0.50 at 1.02749 [#2 sell 0.50 AUDUSD at 1.02749]
2012.01.08 00:05:50 Core 1 2011.09.20 14:00:00 deal performed [#2 sell 0.50 AUDUSD at 1.02749]
2012.01.08 00:05:50 Core 1 2011.09.20 14:00:00 deal #2 sell 0.50 AUDUSD at 1.02749 done (based on order #2)
2012.01.08 00:05:50 Core 1 2011.09.20 14:00:00 instant sell 0.50 AUDUSD at 1.02749 tp: 1.01490 (1.02749 / 1.02766 / 1.02749) <------------------------------- 0.5 lot
Waht happens is that instead of taking the first takeprofit both trades end at the second profit by bying one lot
Is there something I must do between the placing of the 2 trades so that they will be treated individually?