When is Tradeprice updated?

Forums ProRealTime English forum ProOrder support When is Tradeprice updated?

Viewing 11 posts - 1 through 11 (of 11 total)
  • #140514

    Please can you help me with this? I am trying to place a stop order when the trade moves to breakeven, for which I need to know the price at which the trade was made, which I think is tradeprice. The trade is placed on the hourly chart (update on close) but the trade management code is on the 15 minute chart. It’s not working as I expect. In the attached screenshot, the trade is entered at 10.00 at 6021.7. I believe that tradeprice remains set to the previous trade until the next 15 minute bar, ie 10.15, when I expect it to be updated to 6021.7, but it’s not till 11.45. Can anyone please explain why?

    Thanks.

    #140518

    the trade management code is on the 15 minute

    So therefore the trade management code would not know / be able to compute the Trade Price until the next time the trade management code runs (after trade is opened at 10:00)  which would be 10:15.

    Probably needs a bit of thinking on it as you fall asleep!? 🙂 This is what I do and it’s amazing how our brains work on it while we are asleep and I wake with understanding!

    But I can think of more exciting things to dream about! 🙂

     

    #140537

    Many thanks for your reply, GraHal.

    I could live with the Trade Price being updated at 10.15, but it’s graphed at the top of the screenshot, which shows it not being updated till 6 bars after 10am, ie on the 11.45 bar. What am I missing?

    You’re right about the brain working out these puzzles when we’re not thinking about them directly! What with that, and graphing everything, I can usually work things out; not this one, though.

    1 user thanked author for this post.
    #140633

    Not sure that I fully understand your question but TRADEPRICE is quite simply the price at which the last trade was carried out at. That can be a BUY, SELL, SELLSHORT or EXITSHORT price. So if you use TRADEPRICE to calculate a value at the same time that you send an entry order to the market then it will not be calculating on your entry price but the previous entry or exit price.

    TRADEPRICE as an entry price can only be known at the close of the bar that you entered at the open of.

    If you enter on the hourly chart then you have to wait till the close of the hourly candle to know TRADEPRICE. Try entering on the 15 minute time frame to update it sooner.

    1 user thanked author for this post.
    #140750

    Thanks for the reply, Nicolas. I take your point that, because I entered on the hourly chart, tradeprice will change at the end of the hour when I entered the trade, which is the 11am bar in the attached screenshot. However, it doesn’t seem to change until 11:45. In detail:

    1. as the screenshot shows, the code enters the trade at 10:00 at 6021.7, as shown by the text in the pink box in the middle of the screenshot.
    2. At this time, the top third of the screenshot shows tradeprice graphed, and it’s still at the price of the last trade entry, which is 6204.
    3. This is a 15-minute chart, as you can see from the timescale at the bottom of the chart. You say in your 9:46 post above: “TRADEPRICE as an entry price can only be known at the close of the bar that you entered at the open of.” So I’d expect it to change at on the 11:00 bar, the fourth bar after the trade opens, but it doesn’t.
    4. The top third screenshot, graphing tradeprice, shows it not changing until around 11:45, just before the trade closes, at which point it becomes the price that the trade opened at, ie 6021.7.

    Can you explain to me what’s happening?

    Again, many thanks.

    #140969

    I’m very sorry to go on, but I don’t understand what’s happening with tradeprice in my screenshot, as I’ve described in points 1 – 4 above. I feel that this is so stupid that it’s blindingly obvious, but I still don’t see it. I would really appreciate help with this. Perhaps someone could go through my points 1 – 4 and explain at which one I’m going wrong.

    Thank you in advance.

    #140976

    You need to post your code in order to progress further else we are guessing what is not working correctly?

    #141011

    @teapot2002, do you change the timeframe(default) when trying to graph or trade management?

    Below I can enter trade at 1 hour and the tradeprice is correct on 15-min chart

     

    1 user thanked author for this post.
    #142736

    Dow Jones – belated thanks, but many of them! That is the answer. I was graphing it on the 1 hour timeframe.

    Here’s an embarrassing admission – I don’t know how to ‘thank’ people officially. If you tell me, I shall thank you officially, as well as all the other kind people who have answered my questions in the past.

    #142744

    embarrassing admission – I don’t know how to ‘thank’ people officially

    When you come back to confirm if the answer is right, it is the big thanks already. Otherwise, it is really just handy, please don’t mind so much about it 🙂

    1 user thanked author for this post.
    #142754

    Here’s an embarrassing admission – I don’t know how to ‘thank’ people officially

    Just click on the ‘Thanks’ option on the top right of the post that you want to thank.

    1 user thanked author for this post.
Viewing 11 posts - 1 through 11 (of 11 total)

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