anyone can help in fixing this code for the indicator below?
DEFPARAM PreloadBars = 1000
// --- PARAMETERS ---
ATRPeriod = 14
ATRMultiplier = 2
VolumeThreshold = Average[50](Volume) * 2
// --- INDICATORS ---
ATRValue = ATR[ATRPeriod]
ATRExplosion = ATRValue > ATRMultiplier * ATR[5]
VWAPValue = VWAP
// --- PRICE MOVEMENT DETECTION ---
BullishMove = Close > VWAPValue AND ATRExplosion AND Volume > VolumeThreshold
BearishMove = Close < VWAPValue AND ATRExplosion AND Volume > VolumeThreshold
// --- TRIGGER SIGNALS ---
IF BullishMove THEN
DRAWARROWUP(LOW, "Strong Bullish Move", blue)
ENDIF
IF BearishMove THEN
DRAWARROWDOWN(HIGH, "Strong Bearish Move", red)
ENDIF
Hi! here it is
// --- PARAMETERS ---
ATRPeriod = 14
ATRMultiplier = 1
VolumeThreshold = Average[50](Volume) * 2
// --- INDICATORS ---
ATRValue = averagetruerange[ATRPeriod](close)
ATRExplosion = ATRValue > ATRMultiplier * averagetruerange[5](close)
if day<>day[1] then
d=1
VWAP=typicalprice
else
d=d+1
if volume > 0 then
VWAP = SUMMATION[d](volume*typicalprice)/SUMMATION[d](volume)
endif
endif
VWAPValue = VWAP
// --- PRICE MOVEMENT DETECTION ---
BullishMove = Close > VWAPValue AND ATRExplosion AND Volume > VolumeThreshold
BearishMove = Close < VWAPValue AND ATRExplosion AND Volume > VolumeThreshold
// --- TRIGGER SIGNALS ---
IF BullishMove THEN
DRAWARROWUP(barindex,LOW)coloured("blue")//, "Strong Bullish Move", blue)
ENDIF
IF BearishMove THEN
DRAWARROWDOWN(barindex,HIGH)coloured("red")//, "Strong Bearish Move", red)
ENDIF
return VWAPValue
Thanks mate,
could change it to paint bars with dark green and dark red instead of arrows?
Just change it for this:
drawcandle(open,high,low,close)coloured("darkgreen")
The same for darkred colour.