ingvar_e:
Multiple deals on the same symbol combine to become one position . . . perhaps you had 14 x 0.1 lot sell deals on EURUSD ? we can see 2 in the log excerpt you posted . . .
I have an EA that places 2 trades with size 0.1 with the same stoploss
Running in Strategy tester
The trade hits stoploss a while later with a sell of 1.4 lots.
Where the heck did the size 1.4 come from??? Must be missing something vital in my code or what?
Just found that out. Thanks anyhow.
Takes time to get the new way of order handling into the mindset. Working on porting a rather complex EA of mine from MQL4 to MQL5.
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
I have an EA that places 2 trades with size 0.1 with the same stoploss
Running in Strategy tester
The trade hits stoploss a while later with a sell of 1.4 lots.
Where the heck did the size 1.4 come from??? Must be missing something vital in my code or what?
2013.12.10 21:48:41 Core 1 2013.12.04 14:15:40 order performed sell 1.40 at 1.35754 [#162 sell 1.40 EURUSD at 1.35754]
2013.12.10 21:48:41 Core 1 2013.12.04 14:15:40 deal performed [#162 sell 1.40 EURUSD at 1.35754]
2013.12.10 21:48:41 Core 1 2013.12.04 14:15:40 deal #162 sell 1.40 EURUSD at 1.35754 done (based on order #162)
2013.12.10 21:48:41 Core 1 2013.12.04 14:15:40 stop loss triggered buy 1.40 EURUSD 1.35967714 sl: 1.35754 tp: 1.36561 [#162 sell 1.40 EURUSD at 1.35754] <<<<<<<<<<<<<<<<< 1.4 ?????
2013.12.10 21:48:41 Core 1 2013.12.04 14:08:00 [PlaceOrder]: Trade request has been successfully executed, order volume = 0.1
2013.12.10 21:48:41 Core 1 2013.12.04 14:08:00 order performed buy 0.10 at 1.35961 [#161 buy 0.10 EURUSD at 1.35961] <<<<<<<
2013.12.10 21:48:41 Core 1 2013.12.04 14:08:00 deal performed [#161 buy 0.10 EURUSD at 1.35961]
2013.12.10 21:48:41 Core 1 2013.12.04 14:08:00 deal #161 buy 0.10 EURUSD at 1.35961 done (based on order #161)
2013.12.10 21:48:41 Core 1 2013.12.04 14:08:00 instant buy 0.10 EURUSD at 1.35961 sl: 1.35754 tp: 1.36561 (1.35954 / 1.35961 / 1.35954)
2013.12.10 21:48:41 Core 1 2013.12.04 14:08:00 [PlaceOrder]: Order checked
2013.12.10 21:48:41 Core 1 2013.12.04 14:08:00 [PlaceOrder]: Trade request has been successfully executed, order volume = 0.1
2013.12.10 21:48:41 Core 1 2013.12.04 14:08:00 order performed buy 0.10 at 1.35961 [#160 buy 0.10 EURUSD at 1.35961] <<<<<<<<
2013.12.10 21:48:41 Core 1 2013.12.04 14:08:00 deal performed [#160 buy 0.10 EURUSD at 1.35961]
2013.12.10 21:48:41 Core 1 2013.12.04 14:08:00 deal #160 buy 0.10 EURUSD at 1.35961 done (based on order #160)
2013.12.10 21:48:41 Core 1 2013.12.04 14:08:00 instant buy 0.10 EURUSD at 1.35961 sl: 1.35754 tp: 1.36261 (1.35954 / 1.35961 / 1.35954)
2013.12.10 21:48:41 Core 1 2013.12.04 14:08:00 [PlaceOrder]: Order checked
code: