Buongiorno,
è possibile indicare con un cerchio o rettangolo quando una o più candele Heikin Ashi la loro ombra per un valore di 5 punti esce dalla BB+ e BB-.
Grazie
Questo indicatore farebbe quello che vuoi. Fateci sapere se è ok per voi.
Se lo desideri, puoi modificare il periodo e il moltiplicatore delle bande di Bollinger nel codice.
//HA
IF BarIndex=0 THEN
xClose = (open+high+low+close)/4
xOpen = open
xHigh = high
xLow = low
ELSE
xClose = (open+high+low+close)/4
xOpen = (xOpen[1]+xClose[1])/2
xHigh = Max(max(high, xOpen), xClose)
xLow = Min(min(Low, xOpen), xClose)
endif
//Bbands
nbb=20
coeffbb=2
mabb = average[nbb]
upperbb = mabb+coeffbb*std[nbb]
lowerbb = mabb-coeffbb*std[nbb]
if(xLow<lowerbb) then
drawtext("▲",barindex,xlow)
endif
if(xhigh>upperbb) then
drawtext("▼",barindex,xhigh)
endif
return
@Nicolas
Scusami Nicolas ma per filtrare i falsi segnali è possibile che l’indicatori disegni un triangolo solo per le candele che sono di 5 superiori alle Bande.
Grazie
//HA
IF BarIndex=0 THEN
xClose = (open+high+low+close)/4
xOpen = open
xHigh = high
xLow = low
ELSE
xClose = (open+high+low+close)/4
xOpen = (xOpen[1]+xClose[1])/2
xHigh = Max(max(high, xOpen), xClose)
xLow = Min(min(Low, xOpen), xClose)
endif
//Bbands
nbb=20
coeffbb=2
mabb = average[nbb]
upperbb = mabb+coeffbb*std[nbb]
lowerbb = mabb-coeffbb*std[nbb]
if(xLow<lowerbb-5*pointsize) then
drawtext("▲",barindex,xlow)
endif
if(xhigh>upperbb+5*pointsize) then
drawtext("▼",barindex,xhigh)
endif
return