Tradeprice of Probacktest vs Live Trading
Forums › ProRealTime English forum › ProOrder support › Tradeprice of Probacktest vs Live Trading
- This topic has 12 replies, 4 voices, and was last updated 4 years ago by GraHal.
-
-
06/15/2019 at 9:07 AM #100712
Hi everyone.
I was trading US oil on IG with PRT with a fixed spread of 2.8.
And my code incorporates a trailing stop mechanism using “tradeprice(1)” to indicate my entry price. During the probacktest, a 2.8 pt spread was set and the orders were executed at open price of a bar + 2.8/2, and everything was fine. However, in live trading, sometimes the orders were executed at open price of a bar + 2.8/2+x, where x is varying from 0.1 to 0.4. The presence of x does alter my “tradeprice(1)” sometimes, leading to trailing stop order not triggered, which further result in a winning trade in probacktest yet losing trade in real trade.
My questions are:
- Is the presence of x due to network latency / IG issue?
- is there anyway on coding that could help me tackle this issue? Not using function “tradeprice”?
Thanks.
06/15/2019 at 10:17 AM #100715Is the presence of x due to network latency / IG issue?
Isn’t x the variation in IG spread in the Live environment?
06/15/2019 at 10:20 AM #10071606/15/2019 at 6:54 PM #10076306/15/2019 at 6:57 PM #100766If your issue is due to difference between the closing price you use to calculate a stop and the actual TRADEPRICE that you get at the next candle open +/- spread when the trade is opened then the best thing is to use MTF and use a very fast time frame to check if you are now on the market and recalculate all stops and take profits using the TRADEPRICE a second after the trade has opened.
06/16/2019 at 8:28 AM #100782I just discovered that the order executed were seconds after the instant that it should be – network latency.(from the email notification of order)
Since MTF isn’t available on PRTv10.3, Is there any functions that i can store the value of open price of the entry candle for my calculation of trailing stop ?
06/17/2019 at 9:30 AM #100855TRADEPRICE is exact price where the order is opened. Since it is the broker that give you that price, you can’t know it in advance! The best way to do is indeed to use MTF to catch quickly the tradeprice that the broker returned.
MTF should theoretically be usable by all IG customers during the month of June.
06/17/2019 at 9:56 AM #10086106/17/2019 at 10:33 AM #100865With the help of the MTF, you can have your strategy conditions tested on a 5 minute bars but your orders management made on a 1-second timeframe. So you could update theoretically 300 times your stoploss levels in a 5-minute bar (it will be less of course, because of technical limitations such as slippage).
06/17/2019 at 2:39 PM #10088606/17/2019 at 4:40 PM #10089206/18/2019 at 3:00 AM #10093506/18/2019 at 9:57 AM #100944Just make a request by sending an em
Yes I believe that is the method.
You would need to quote your IG account number.
-
AuthorPosts
Find exclusive trading pro-tools on