Let me explain the problem. Chikou Span is the current price shown 26 points in the past. I want the cross of the chikou span with the price bar bar as buy signal.
The close[26] shown as blue and the Chikou Span shown as green. I use the ta.crossover to get the cross over, but I get the cross over in wrong places. see my chart. I need help on how to get the crossover of the Chikou Span with price bar in proper location. 26 price points in the past. Can someone help me?
enter image description here
here is my code:
chikou_Span=close
plot(Chikou_Span, title = "Chikou", color = color.green, offset = -26)
Chikou_Span1 = close[26]
ChikouCross = ta.crossunder(Chikou_Span1,close)
plot(Chikou_Span1,title = "chikou Span1", color=color.blue)
plotshape(series = ChikouCross,location = location.belowbar, color
= color.red,style = shape.labelup,text = "buy",title =
"chikousell", textcolor = color.white)
sadiq Ibrahim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.