... if close[1]-close[0]>0 ,means the close price is lower than the previous one.isn't that means FALLs?
i think it should be add to sumn;
close[i]-close[i-1]>0 means the close price of candle i is higher than that of candle
i-1. In MQL 5 candle i is newer than i-1, unless you set the array as series. In MQL 4
candle
i is older than i-1, unless you set the array as no series, which obviously is done in RSI.mq4:
ArraySetAsSeries(ExtRSIBuffer,false); ArraySetAsSeries(ExtPosBuffer,false); ArraySetAsSeries(ExtNegBuffer,false); ArraySetAsSeries(close,false);
close[i]-close[i-1]>0 means the close price of candle i is higher than that of candle
i-1. In MQL 5 candle i is newer than i-1, unless you set the array as series. In MQL 4
candle
i is older than i-1, unless you set the array as no series, which obviously is done in RSI.mq4:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
as we know that
and
so if we want to get 'A' of above we should do as
right?
but the RSI source shows the calucation of the A above is that:
let i is 1 so it is close[1]-close[0] and that results (close[1]-close[0] will be >0) was add to sump.
ok here is the problem. if close[1]-close[0]>0 ,means the close price is lower than the previous one.isn't that means FALLs?
i think it should be add to sumn;
anything goes wrong?
-----------------
here is the codes: