Hi all,
Here is an indicator coded for one of the readers of my website.
We BUY if :
Of course, we SELL for opposite conditions.
So here is the code :
achat = 0
vente = 0
TMA8 = TriangularAverage[8](open)
// CONDITIONS D'ACHAT
ca1 = close > TMA8 and open > TMA8 and close > open
ca2 = low < TMA8
ca3 = (open - low) > (close - open)
ca4 = high - close <= 2 * pipsize
ca5 = close - open >= 3 * pipsize
// CONDITIONS DE VENTE
cv1 = close < TMA8 and open < TMA8 and close < open
cv2 = high > TMA8
cv3 = (high - open) > (open - close)
cv4 = close - low <= 2 * pipsize
cv5 = open - close >= 3 * pipsize
IF ca1 and ca2 and ca3 and ca4 and ca5 THEN
achat = 1
ELSIF cv1 and cv2 and cv3 and cv4 and cv5 THEN
vente = -1
ENDIF
return achat as "ACHAT", vente as "VENTE"