Tradeindex – Define please

Forums ProRealTime English forum ProOrder support Tradeindex – Define please

Viewing 8 posts - 1 through 8 (of 8 total)
  • #7307

    Which of the following is correct please?

    • Tradeindex is the number of bars since the last trade, a number which increases until the next trade.       Example: First Trade at ‘Barindex 250’ and so BarIndex 250 is the same bar as Tradeindex 1 and barindex 251 is same bar as Tradeindex 252 etc.  Next Trade at barindex 300 and so barindex 300 is same bar as tradeindex 1 and barindex 301 is same bar as Tradeindex 2. The trade at barindex 250 is then Tradeindex(1) 1 and barindex 251 is same bar as Tradeindex(2)2
    • Tradindex is the bar index number of the last trade, i.e a single number that doesnt change until the next trade.  Example: First trade at ‘barindex 250’ which is tradeindex 250 and then after another 50 bars at barindex 300 the next trade occured and so tradeindex is now 300 and tradeindex(1) is 250.

    I reckon I can now see the answer … its the 2nd paragraph above??

    I have read the PRT manual re Tradeindex and this site but still not 100% sure.

    Thanks

    GraHal

     

    #7315

    Hi GraHal, you are right with the 2nd paragraph.

    The tradeindex is the exact same number of the barindex when the trade occurred. This number will never change for this trade of course.

    I realize there is a mistake in the website documentation about this instruction, I’ll fix it today. Sorry for inconvenience 🙂

    When you are not sure of what values something do return, just use the GRAPH instruction, that’s what I have done for your question.

     

    #7325

    Thank you once again Nicolas!

    I woke this morning, thinking … I could have used the GRAPH function as Nicolas mentioned on another issue I had … thank you for your patience.

    Cheers

    GraHal

    #220370

    Bonjour à tous !

    J’essaie de programmer un code qui achète lorsqu’un signal est donné (ex RSI <15) et qui ne vendra QUE si la cloture d’une bougie suivante est supérieure au prix d’achat.

    Mon problème est que si la bougie d’achat cloture plus haut que le prix d’achat, le trade est cloturé…

    J’essaie de placer cette ligne :

    If LONGONMARKET  and barindex > tradeindex  and close > positionprice then …

    Mais cela ne fonctionne pas…

    Je ne vois pas ce qui cloche…

    Merci de votre aide !

    Michel

    Hello everyone ! I am trying to program a code that buys when a signal is given (eg RSI <15) and which will ONLY sell if the close of a following candle is higher than the purchase price. My problem is that if the buy candle closes higher than the buy price, the trade is closed… I try to place this line:

    If LONGONMARKET and barindex > tradeindex and close > positionprice then…

    But This doesn’t work… I don’t see what’s wrong… Thank you for your help! Michael

    #220373

    Try below

     

    #220379
    JS

    Hi,

    If you do not want the position in the same bar to open and close, use:

    BarIndex-TradeIndex>1

    If LongOnMarket and (BarIndex-TradeIndex)>1 and Close > TradePrice then

    Sell at Market

    EndIf

    1 user thanked author for this post.
    #220456

    Thanks to GraHal and JS ! It works !!!

     

    1 user thanked author for this post.
    #220484

    @Michel_I

    Only post in the language of the forum that you are posting in. For example English only in the English speaking forums and French only in the French speaking forums.

    Thank you 🙂

     

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