Detect stop trigger in OnTradeTransaction backtest - page 5

 
chinaski:

Hello Angevoyageur, 

Access point Europe. Backtesting with : "

can you give me complete IP of this server ? 

I don't know where to find this ip, how does this relate to the topic ?
 

Not really.

I guess you do your tests seriously therefore may you know what server best for backtest. This is the background 

 

Isn't it more simple to have a diff check of the Balance in Transaction?

Thanks.

 
Hi guys

I encountered a big problem at testing my program in #backtest #Mql5. I using the function #OnTradeTransaction for check StopLoss events.

sometimes two or more stops occur at the same price and same time , but only one report is given in the function OnTradeTransaction. Can anyone help me?

sorry My code is very big and i can only report Log file.

Thanks!


at 14:48:32 two stoploss occoured(226 and 228) but in  OnTradeTransaction Only reported one Stop(226) no any report from stoploss....


LH 0 19:14:13.071 Trade 2020.01.17 14:48:32   stop loss triggered #226 buy 0.34 EURUSD 1.11123 sl: 1.11062 [#234 sell 0.34 EURUSD at 1.11062]
EP 0 19:14:13.071 Trades 2020.01.17 14:48:32   deal #58 sell 0.34 EURUSD at 1.11062 done (based on order #234)
QF 0 19:14:13.071 Trade 2020.01.17 14:48:32   deal performed [#58 sell 0.34 EURUSD at 1.11062]
HD 0 19:14:13.071 Trade 2020.01.17 14:48:32   order performed sell 0.34 at 1.11062 [#234 sell 0.34 EURUSD at 1.11062]
DE 0 19:14:13.071 Trade 2020.01.17 14:48:32   stop loss triggered #228 buy 0.25 EURUSD 1.11146 sl: 1.11062 [#235 sell 0.25 EURUSD at 1.11062]
IE 0 19:14:13.071 Trades 2020.01.17 14:48:32   deal #59 sell 0.25 EURUSD at 1.11062 done (based on order #235)
NK 0 19:14:13.071 Trade 2020.01.17 14:48:32   deal performed [#59 sell 0.25 EURUSD at 1.11062]
CQ 0 19:14:13.071 Trade 2020.01.17 14:48:32   order performed sell 0.25 at 1.11062 [#235 sell 0.25 EURUSD at 1.11062]
NQ 0 19:14:13.071 Trade 2020.01.17 14:48:32   order [#232 sell stop 0.5 EURUSD at 1.11062] triggered
FP 0 19:14:13.071 Trades 2020.01.17 14:48:32   deal #60 sell 0.5 EURUSD at 1.11062 done (based on order #232)
NR 0 19:14:13.071 Trade 2020.01.17 14:48:32   deal performed [#60 sell 0.5 EURUSD at 1.11062]
LG 0 19:14:13.071 Trade 2020.01.17 14:48:32   order performed sell 0.5 at 1.11062 [#232 sell stop 0.5 EURUSD at 1.11062]
2020.01.17 14:48:32   
2020.01.17 14:48:32   --------- START OnTradeTransaction ---------
2020.01.17 14:48:32   ONTRADE TYPE= TRADE_TRANSACTION_DEAL_ADD
2020.01.17 14:48:32   DEAL_ADD DEAL_REASON= 4
2020.01.17 14:48:32   OnTradeTransaction OUT-SL  Position=226


 
Don't calls to Trade transaction get accumulated?

I mean, don't you have to check if more than one action took place when being called?

OnTrade works like that, I was assuming OnTradeTransaction also needs to check for accumulated calls.

Just like OnTick, you cannot assume to be called for every tick. It can happen that calls are being "skipped" or accumulated.