EL how to: next bar buy if previous RSI < 20

stasbz

Established member
Messages
587
Likes
1
please help.
how to write "Previous bar RSI < 20" in esay language in this code:
IF Previous bar RSI < 20
AND
current bar high > previous high bar
then buy
 
inputs:
RSI_Price ( close ) ,
RSI_Len ( 20 ) ,
RSI_Level ( 20 ) ;

variables:
MyRSI ( 0 ) ;

MyRSI = RSI( RSI_Price, RSI_Len ) ;

if (MyRSI[ 1 ] < RSI_Level) and (high > high[ 1 ]) then
Buy next bar market ;
 
Top