Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.
Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.
By using this site, you agree to our Terms of Use.
Difference Between Closed(1) and Close[1]
in Coding Forum
Posted
Hi All
I am trying to plot a simple Relative Strength indicator in EL. When I plot RSVal based on the following code:
if c/closed(1)>(c of data2/(closed(1) of data2))then RSVal=1;
if c/closed(1)<(c of data2/(closed(1) of data2))then RSVal=-1;
I get different results than when I plot if based on the following code:
if c/close[1]>(c of data2/(close[1] of data2))then RSVal=1;
if c/close[1]<(c of data2/(close[1] of data2))then RSVal=-1;
I thought that closed(1) and close[1] would be the same? I guess not? Can someone please tell me what the differences are?
Regards
- Fanus