Metti questo indicatore sul grafico dei prezzi (non sotto):
n = 30
GapUP = summation[n](low >= (high[1] * 1.10))
GapDN = summation[n](high <= (low[1] * 0.90))
x = 0
y = 0
IF GapUP Then
x = 1
DrawArrowUP(BarIndex,low[2]) coloured(0,128,0,155)
ENDIF
IF GapDN Then
y = 2
DrawArrowDOWN(BarIndex,high[2]) coloured(255,0,0,255)
ENDIF
n = x + y
RETURN
Grazie
credo dovrebbe porre quindi UNA freccia in ogni punto in cui si verifichi quindi un gap che rientri nei casi da me inseriti nel Proscreener, tuttavia (vd file allegato “Immagine.png”), vedo che, dopo il gap, compaiono frecce in ogni candela!
Si può modificare qualcosa?
Grazie!
Eccolo modificato. Non ripete il segnale quando il GAP è sempre sulla stessa barra (all’interno delle ultime N candele):
n = 30
GapUP = summation[n](low >= (high[1] * 1.10))
BarraUP = BarsSince(GapUP)
IF BarraUP = BarraUP[1] THEN
GapUP = 0
ENDIF
GapDN = summation[n](high <= (low[1] * 0.90))
BarraDOWN = BarsSince(GapDN)
IF BarraDOWN = BarraDOWN[1] THEN
GapDN = 0
ENDIF
x = 0
y = 0
IF GapUP Then
x = 1
DrawArrowUP(BarIndex,low[2]) coloured(0,128,0,155)
ENDIF
IF GapDN Then
y = 2
DrawArrowDOWN(BarIndex,high[2]) coloured(255,0,0,255)
ENDIF
n = x + y
RETURN