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!
c1 = (close[1] > close[10]*1.05)
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:
c1 = (close[0] > close[9]*1.05)
If you don’t place any [ ] after close then if defaults to the current candle so you can also just use:
c1 = (close > close[9]*1.05)
I’m going to have to try and learn this coding, seems fun.
And that worked perfectly, many thanks.
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/