Hi All,
i am starting understanding and coding indicators and i am a little confused... i've seen inside the code of and indicator that calculates a weekly pivot point this line
i don't understand why this line is not this other one:
How Close[i+1] is retrieving the last week high?.
Could you help me to understand how series work inside indicator code?
Hi All,
i am starting understanding and coding indicators and i am a little confused... i've seen inside the code of and indicator that calculates a weekly pivot point this line
i don't understand why this line is not this other one:
How Close[i+1] is retrieving the last week high?.
Could you help me to understand how series work inside indicator code?
Regards.
Close[x] retrieve the close price of candle x on the current chart. That can't return the high (unless close = high).
iLow(Symbol(),PERIOD_W1,1)
gives you the low of last week (independtly of any chart). Use iHigh for the high.
An indicator is calculated on historical data, so you have a loop with an index (i) and you have to add 1 (i+1) to find to high of previous candle.
Either the indicator is buggy, or you misunderstood it. If you need more help post the code.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi All,
i am starting understanding and coding indicators and i am a little confused... i've seen inside the code of and indicator that calculates a weekly pivot point this line
last_week_high = Close[i+1];
i don't understand why this line is not this other one:
How Close[i+1] is retrieving the last week high?.
Could you help me to understand how series work inside indicator code?
Regards.