distance calculation with TRADEPRICE
Forums › ProRealTime English forum › ProOrder support › distance calculation with TRADEPRICE
- This topic has 7 replies, 5 voices, and was last updated 1 year ago by supernova.
-
-
08/06/2023 at 11:37 PM #218654
I’m new to prorealcode and I’m just looking over the documentation / trying my first scripts, however when I look here https://www.prorealcode.com/documentation/tradeprice in the examples it says close-TRADEPRICE
Looking here: https://www.prorealcode.com/documentation/breakeven/
high-tradeprace and tradeprice-low is used
Where does that close- come from? Can I prefix this to any candlestick ? Can anyone point me to the doc where this close- and maybe other prefix / afixes are documented ?
cheers
08/07/2023 at 3:19 AM #21865508/07/2023 at 8:50 AM #21866008/07/2023 at 9:27 AM #218671Because you’re new… 🙂
As you have read, the “TradePrice” is the price level at which the last order was executed…
You can now, in combination, check different situations with this TradePrice for example, am I in profit with my purchased (Long) contract?
If Close – TradePrice > 0 then (yes, I am in profit)
Of course, instead of the “Close”, you can also use “Low”, “High” or “Open”…
In general, you can check what the situation is in relation to the price (TradePrice) for which you have bought / sold something…
Note: TradePrice=TradePrice(0)=TradePrice(1)
08/07/2023 at 9:58 AM #21867408/07/2023 at 10:36 AM #218676I would like to emphasize just one important thing that reminded me Roberto in an old post: tradePrice(1) is non the entry price, but simply the last traded price.
So, when you are NOT AT MARKET tradePrice(1) is the exit price of the last position and the entry price is tradePrice(2).
08/07/2023 at 10:38 AM #218677So, when you are NOT AT MARKET tradePrice(1) is the exit price of the last position and the entry price is tradePrice(2)
Yes because an exit is actually an order, so a trade, so a new TRADEPRICE
😉
08/08/2023 at 12:09 AM #218704 -
AuthorPosts