When is Tradeprice updated?
Forums › ProRealTime English forum › ProOrder support › When is Tradeprice updated?
- This topic has 10 replies, 4 voices, and was last updated 5 years ago by
Vonasi.
-
-
07/30/2020 at 6:34 PM #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.
07/30/2020 at 6:59 PM #140518the 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! 🙂
07/31/2020 at 10:11 AM #140537Many 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.
08/01/2020 at 9:46 PM #140633Not 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.
08/03/2020 at 3:33 PM #140750Thanks 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:
- 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.
- 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.
- 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.
- 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.
08/06/2020 at 8:43 AM #140969I’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.
08/06/2020 at 9:30 AM #14097608/06/2020 at 2:08 PM #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
1234567891011121314151617181920212223// Conditions to enter long positionstimeframe(1 hour, updateonclose)MA20 = Average[20]MA50 = Average[50]C1 = MA20 crosses over MA50C2 = MA20 crosses under MA50IF NOT OnMarket AND C1 THENBUY 1 CONTRACTS AT MARKETSET STOP pLOSS 100SET TARGET pPROFIT 150ENDIF// Conditions to enter short positionsIF NOT OnMarket AND C2 THENSELLSHORT 1 CONTRACTS AT MARKETSET STOP pLOSS 100SET TARGET pPROFIT 150ENDIFtimeframe(default)GRAPH tradeprice1 user thanked author for this post.
08/27/2020 at 4:50 PM #142736Dow 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.
08/27/2020 at 6:30 PM #142744embarrassing 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.
08/27/2020 at 7:44 PM #142754Here’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.
-
AuthorPosts
Find exclusive trading pro-tools on