pilotgsms

Candles Pattens (v. 1.14)

This script sows you candlestick patterns in real-time.
At that moment script knows Bearish/Bullish Engulf and Doji Points.
You can recommend me which pattens you want to see in next version at comment section below

Script open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questo script sui tuoi grafici?
study(title="Candles Pattens", overlay=true)
// version: 1.14

delta = close - open
gap = open - close[1]
is_up = delta >= 0
high_len = is_up ? high - close : high - open
low_len = is_up ? open - low : close - low
mod_delta = delta<0 ? -delta:delta
avg_mod = (mod_delta + mod_delta[1] + mod_delta[2] + mod_delta[3] + mod_delta[4] + mod_delta[5] + mod_delta[6] + mod_delta[7] + mod_delta[8] + mod_delta[9])/10

// ENGULF
is_bearish_engulf = -delta > delta[1]*2 and delta[1] > 0 and delta < 0 and delta[2] > 0
is_bullish_engulf = delta > -delta[1]*2 and delta[1] < 0 and delta > 0 and delta[2] < 0
plotshape(is_bearish_engulf, style=shape.triangledown, location=location.abovebar, color=red, title='bearish_englf')
plotshape(is_bearish_engulf, style=shape.triangledown, location=location.abovebar, color=red, title='bearish_englf')
plotshape(is_bullish_engulf, style=shape.triangleup, location=location.belowbar, color=green, title='bullish_englf')

// DOJI
is_doji_up = delta*10 < mod_delta and (high-low) > mod_delta*10 and delta[1] < 0
is_doji_down = delta*10 < mod_delta and (high-low) > mod_delta*10 and delta[1] > 0
plotshape(is_doji_down, style=shape.triangledown, location=location.abovebar, color=red, title='doji_down')
plotshape(is_doji_down, style=shape.triangledown, location=location.abovebar, color=red, title='doji_down')
plotshape(is_doji_up, style=shape.triangleup, location=location.belowbar, color=green, title='doji_up')

// DOJI DRAGONFLY
is_doji_dr_up = delta*10 < mod_delta and low_len*10 < mod_delta and high_len > mod_delta*5 and delta[1] < 0
is_doji_dr_down = delta*10 < mod_delta and high_len*10 < mod_delta and low_len > mod_delta*5 and delta[1] > 0
plotshape(is_doji_dr_down, style=shape.triangledown, location=location.abovebar, color=red, title='doji_dr_down')
plotshape(is_doji_dr_down, style=shape.triangledown, location=location.abovebar, color=red, title='doji_dr_down')
plotshape(is_doji_dr_up, style=shape.triangleup, location=location.belowbar, color=green, title='doji_dr_up')

// 3 SAME TICK
//same_up = delta > mod_delta*2 and delta[1] > mod_delta[1]*2 and delta[2] > mod_delta[2]*2 and is_up 
//same_down = delta*2 < mod_delta and (high-low) > mod_delta*10 and delta[1] > 0
//plotshape(same_down, style=shape.triangledown, location=location.abovebar, color=red, title='3_same_down')
//plotshape(same_down, style=shape.triangledown, location=location.abovebar, color=red, title='3_same_down')
//plotshape(same_up, style=shape.triangleup, location=location.belowbar, color=green, title='3_same_up', offset=2)
//plotshape(same_up, style=shape.triangleup, location=location.belowbar, color=green, title='3_same_up')
//plotshape(same_up, style=shape.triangleup, location=location.belowbar, color=green, title='3_same_up', offset=1)