Hi,
I’m working on an indicator that will mark with an arrow certain bars, thing is, the DRAWARROWUP function doesn’t seems to work. I’ve tried the simple example below and nothing is drawn on the screen, any thoughts? Thanks!
sto = Stochastic[10,3](close)
signal = average[5](sto)
rge = averagetruerange[10](close)
if sto[1]>80 and sto crosses under signal then
DRAWARROWDOWN(barindex[1],high[1]+rge/2)coloured(255,10,10)
elsif sto[1]<20 and sto crosses over signal then
DRAWARROWUP(barindex[1],low[1]-rge/2)coloured(10,255,10)
endif
RETURN
Your code is working well, if you add it on the price chart.
Thank you Nicolas,
I’ve tried again, and it doesn’t work. I added it to the chart but no arrows are drawn. Are there any requirements (like version or something) for this command to work?
It works finely, as Nicolas said, you should add it ON the price chart like moving averages, not below it like other indicators/oscillators (read https://www.prorealcode.com/topic/add-indicator-in-mainchart/).
Sorry!!! i couldn’t tell the difference, now i realize that i need to add the indicator throught the “right click->settings price” option on the chart.
Thank you both! really appreciate it
You don’t have to RIGHT click, just CLICK.
Follow the hints from the 4 attached pics, A through D.
I added Pivot Points as an example, you want to add whatever you like.