Why are these buy/sell prices not matching up?

Forums ProRealTime English forum ProOrder support Why are these buy/sell prices not matching up?

Viewing 4 posts - 1 through 4 (of 4 total)
  • #94317

    Hi everyone:

    See attached from an AUDNZD currency chart.

    The buy price, which is “TradePrice”, is graphed at 1.04910; the blue arrows indicating the entry show it at over 1.0520. When I run the backtest, I do NOT have the “Spread” option checked (enabled).

    It’s similar for the sell as well.

    Here is the relevant code. This is the only place in the code where the value for theBuyTradePrice is set and also the only place in the code where the values are graphed:

    So why is there such a discrepancy?

    Thank you.

    #94320

    Code is read at Close, and orders are launched at next open, it means that at the time when the code is read, we have no hint of what would be the exact open price, you’ll have to wait for the order to be launched for that.. (next bar!).

    1 user thanked author for this post.
    #94321

    I understand orders are executed at the next bar.

    So then:

    1) the “tradeprice” should be the same “open” price of the next bar if the orders are executed on the next open, correct?

    2) to get the actual price, we have to set a flag to let us know when the next bar comes around. Then, when that next bar does come around, we can do “tradeprice” to get the exact price from the order in the code executed from the previous bar’s close?

    3) Or is there an easier/better way to do #2 above?

    THank you.

    #94362

    1.yes

    2.yes

    3.not really,  you could try with MTF instruction to get the tradeprice faster with a lower timeframe.

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

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