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.