Change imput interval
Posted: Sun Jan 08, 2023 3:02 pm
Hello
I'm working on a strategy based on Ichimoku and I need some help.
These lines will take the average of highest and lowest price starting 9 time periods from the latest candle.
What I need is to take the average (still a period of 9), which start 18 timeperiods, and ends 9 timeperiods away from the latest candle, i.e move the period 9 steps backwards.
Im new both to pinescript and this community so just let me know if I'm in the wrong channel or anything else I need to know.
I'm working on a strategy based on Ichimoku and I need some help.
Code: Select all
conversionPeriods = input.int(9, minval=1, title="Conversion Line Length")
donchian(len) => math.avg(ta.lowest(len), ta.highest(len))
conversionLine = donchian(conversionPeriods)
What I need is to take the average (still a period of 9), which start 18 timeperiods, and ends 9 timeperiods away from the latest candle, i.e move the period 9 steps backwards.
Im new both to pinescript and this community so just let me know if I'm in the wrong channel or anything else I need to know.