Forums › ProRealTime English forum › ProOrder support › Help Writing First ProBackTest Algo based on RSI conditions › Reply To: Help Writing First ProBackTest Algo based on RSI conditions
04/05/2019 at 8:05 AM
#95500
RSI is <=30 for 3 consecutive days then BUY 3000 CASH AT MARKET
Here is the code for that part:
|
1 2 3 4 5 |
test = summation[3](rsi[14]<=30)=3 if test then buy 3000 cash at market endif |
2 links with examples on how to partial close positions:
https://www.prorealcode.com/topic/bollinger-band-coding-help-please/#post-80959