Hi guys,
i have coded an indicator which uses arrow and the code makes drawn the arrow couple of times when it is triggered.
i want just to have the arrow drawn once. how to make it ?
thanks !
I think that this will solve your issue. If not, please post a screenshot of it ?
DefParam DrawOnLastBarOnly = true // Put on the first line.
Please don’t double post.
If your code plots multiple times the arrow, it is because your conditions are still fulfilled!
Without reading your code, there are multiple ways to handle that, but first try by checking if your conditions wasn’t true before the first placement of the arrow:
conditions = close>average[20] and rsi[14] crosses over 50
if conditions and not conditions[1] then
drawarrow(barindex,low)
endif
return