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
Hi there,
if high-tradeprice >= 10*pointsize then
Hyphens (-) do not exist in the ProRealCode / ProBuilder language, so this is to be read as
if high - tradeprice >= 10*pointsize then
Regards,
Peter
Candlesticks have constants price: Open, High, Low and Close
Close – TRADEPRICE
is a subtract of these 2 price constants that give a distance in price.
JSParticipant
Senior
Because 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)
Okay got It, thanks very much, now it makes sense.
I 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).
So, 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
😉
so it behaves like an array for every order that occured and every order gets pushed onto it?
thanks for the additional information
btw.. i searched and didn’t find anything, is there maybe a discord channel for prorealcode ?