Coded it by request, here is a simple Heiken Ashi screener that detect candle HA turn from red to green and from green to red, for turning points detection purposes.
xClose = (Open+High+Low+Close)/4
if(barindex>2) then
xOpen = (xOpen[1] + xClose[1])/2
endif
c1 = xClose>xOpen AND xClose[1]<xOpen[1]
c2 = xClose<xOpen AND xClose[1]>xOpen[1]
SCREENER [c1 OR c2]
You must be logged in to post a comment.
Hi Nicolas, would it be possible to modify this code so that I could try it in ProBackTest?
The strategy I am trying to test is to simply go long on a green HA or go short on a red HA, probably with a trailing stop, using different timeframes.
Any help would be much appreciated, thanks
Bob
Bonjour Nicolas Par rapport à ce code je souhaiterais la ligne de code qui permet d'identifier le changement de couleur avec une bougie sans mèche basse pour le vert et sans mèche haute pour le rouge. Je n'ai pas trouvé comment faire. Merci