wanted to run an indicator that compares the close to the previous 20 closes...can I use... if close > close(close,20) then...?
the indicator compiles but I cant tell if its working.
I'm new to easylanguage and multicharts so I'm unable to get a backtesting optimization working properly.
Thanks
easylanguage question
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: easylanguage question
see FAQ post #1wanted to run an indicator that compares the close to the previous 20 closes...can I use... if close > close(close,20) then...?
the indicator compiles but I cant tell if its working.
I'm new to easylanguage and multicharts so I'm unable to get a backtesting optimization working properly.
Thanks
viewtopic.php?f=16&t=6929
-
- Posts: 24
- Joined: 13 Mar 2012
- Has thanked: 11 times
Re: easylanguage question
Thank you for the help.
Just double checking, the close > close[20]....does that only compare the 20th bar to the current close or does it compare each of the previous 20 bars?
thanks again.
Just double checking, the close > close[20]....does that only compare the 20th bar to the current close or does it compare each of the previous 20 bars?
thanks again.
-
- Posts: 742
- Joined: 09 Apr 2010
- Location: Texas
- Has thanked: 483 times
- Been thanked: 274 times
- Contact:
Re: easylanguage question
The close > close[20] just compares the current Close to the Close 20 bars ago, if you want the highest close over 20 bars then something like this-
Close > highest(close[1],20);
Close > highest(close[1],20);
-
- Posts: 24
- Joined: 13 Mar 2012
- Has thanked: 11 times