Creating a stop at the low of a particular bar

Forums ProRealTime English forum ProRealTime platform support Creating a stop at the low of a particular bar

Viewing 4 posts - 1 through 4 (of 4 total)
  • #32066

    Dear Forum,

    I’d be grateful for any help with the following straighforward coding problem.

     

    Once my trade is entered I want to set a stop at the low of the preceeding bar.

    Now I assumed it would just be

    Sell at Low[1] stop

    However, in backtest at least, this seems to change as Low[1] moves one bar forward with the creation of each new bar.

    Does anyone know the fix for this?

    Many thanks all

    Linden

    #32083

    After the line of code where you buy, you need another line of code to save the low of the previous bar for future use. Example:

     

    #32106

    Thanks Wing, I understand above, except why we need …

     

    #32111

    Thanks Wing, thats really fantastic.

    Many thanks

    Linden

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

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