Current price greater than Previous Price by 5%

Forums ProRealTime English forum ProOrder support Current price greater than Previous Price by 5%

Currently, there are 0 users and 1 guest visiting this topic.
View all attachments
Viewing 4 posts - 1 through 4 (of 4 total)
  • #130508 Report

    I’m playing with the backtest feature – it’s pretty awesome, but I’m not from a programming background and the Simplified creation doesn’t enable me to do the below.

    Basically I want to the current price to have increased by 5% of the price 10 candles before. Can anyone help?

    Current price > Previous price x 1.05

    Would it go something like this?: c1 = (close[1] > close[10]*1.05)

    I hope that make sense. Thank you!

     

    #130510 Report

    Would be the close of the previous candle is greater than the close of the candle 9 candles before that. The current candle is candle zero so you you need:

     

    If you don’t place any [ ] after close then if defaults to the current candle so you can also just use:

     

    1 user thanked author for this post.
    #130513 Report

    I’m going to have to try and learn this coding, seems fun.

    And that worked perfectly, many thanks.

    #130517 Report

    You can find descriptions of every instruction and examples of how to use them here (or by clicking on help and going to the documentation):

    https://www.prorealcode.com/prorealtime-documentation/

    1 user thanked author for this post.
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