distance calculation with TRADEPRICE

Forums ProRealTime English forum ProOrder support distance calculation with TRADEPRICE

Viewing 8 posts - 1 through 8 (of 8 total)
  • #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

    #218655

    Hi there,

    Hyphens (-) do not exist in the ProRealCode / ProBuilder language, so this is to be read as

    Regards,
    Peter

    #218660

    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.

    #218671
    JS

    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)

    #218674

    Okay got It, thanks very much, now it makes sense.

     

    #218676

    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).

    2 users thanked author for this post.
    #218677

    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

    😉

     

    #218704

    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 ?

     

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

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