Tradeprice of Probacktest vs Live Trading

Forums ProRealTime English forum ProOrder support Tradeprice of Probacktest vs Live Trading

Viewing 13 posts - 1 through 13 (of 13 total)
  • #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:

    1. Is the presence of x due to network latency / IG issue?
    2. is there anyway on coding that could help me tackle this issue? Not using function “tradeprice”?

    Thanks.

    #100715

    Is the presence of x due to network latency / IG issue?

    Isn’t x the variation in IG spread in the Live environment?

    #100716

    the spread for US oil is fixed at 2.8 points as shown on ig’s website.

    #100763

    Please provide the link to where it says that the spread on oil is fixed. As far as I am aware no spread is fixed. Brokers will adjust spread based on volatility and also how their own book is balanced at any moment in time.

    #100766

    If 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.

    #100782

    I 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 ?

    #100855

    TRADEPRICE 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.

    #100861

    Thanks Nicolas.

    I understand the benefit of MTF. But it would not be necessary if my trailing stop is calculated each time after completion of bar?

    #100865

    With 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).

    #100886

    That sounds interesting, but I just tested the function “timeframe” and error message popped up saying that it is only available in ProScreener only.

    #100892

    Yes because it is still not officially released, you can ask your broker to activate it (beta version). A lot of people did the same here and are using it now.

    #100935

    Does anyone using IG know how to activate? Just make a request by sending an email??

    #100944

    Just make a request by sending an em

    Yes I believe that is the method.

    You would need to quote your IG account number.

Viewing 13 posts - 1 through 13 (of 13 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login