You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi, I have an indicator that I want to turn into a new custom indicator:
this new custom indicator should have a value of +1 when the value of the indicator in the current bar is higher than the value of the indicator in the previous bar, and -1 vice versa.
Is there a short way to do this? Maybe post an example on how to do this with RSI?
The new indicator should work with iCustom to reference to the old indicator,
and then some kind of loop like this: (where i is the current period? and iCustombuffer the buffer from the old indicator
if (iCustombuffer(i) >= iCustombuffer(i-1))
line(i)=1;
if (iCustombuffer(i) < iCustombuffer(i-1))
line(i)=1;
}
pls some help