I was looking through the forums and had a query in regard to comparing indicators in different time periods. Say I wanted to compare an RSI from 6 candles ago to a current close[0]. How would I go about doing this for example could I do the following;
1
2
3
4
5
6
7
rsi_level=rsi[14]
ifrsi_level[6]>rsi_level[0]then
///do somthing
endif
Also if certain conditions are met would it be possible to record a value inside pro real time.
1
2
3
4
5
6
7
8
9
ifrsi_level>70anddaytrend>3androc_level>3then
SELLSHORT3PERPOINTATMARKET
//What would be the code to record stochastic
sto=stochastic[0]
endif
Really appreciate the feedback and support provided
Yes of course it is. Just save a value as any variable name just as you have done and that variable will keep that value until you give an instruction to change it.
So for example you could even save the last five values:
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.