OPEN-SOURCE SCRIPT
Heikin Joon

XXX////////////////////////////////////////////////////////////////////////////////
// //
// ====== DRAWING and PLOTTING ====== //
// //
////////////////////////////////////////////////////////////////////////////////
// zero median RSI channel hlines
upperx = hline(i_upperx, 'OB Extreme', color.new(color.silver, 60))
upper = hline(i_upper, 'OB', color.new(color.silver, 80))
median = hline(0, 'Median', color.orange, hline.style_dotted)
lower = hline(i_lower, 'OS', color.new(color.silver, 80))
lowerx = hline(i_lowerx, 'OS Extreme', color.new(color.silver, 60))
// channel fill
fill(upper, upperx, color.new(color.red, 90), title = 'Background Fill OB')
fill(upper, lower, color.new(color.blue, 90), title = 'Background Channel')
fill(lower, lowerx, color.new(color.green, 90), title = 'Background Fill OS')
// histogram first, so it is on the bottom of the plot/candle draw stack
plot(i_showHist ? RSI : na, 'RSI Histogram', color.new(color.silver, 80), 1, plot.style_histogram)
// make our HA rsi candles
plotcandle(O, H, L, C, 'HARSI', bodyColour, wickColour, bordercolor = bodyColour)
// RSI overlay plot
plot(i_showPlot ? RSI : na, 'RSI Shadow', colShadow, 3)
plot_rsi = plot(i_showPlot ? RSI : na, 'RSI Overlay', colRSI, 1)
// Stochastic RSI plots and fill
plot(i_showStoch ? StochK : na, 'Stoch K Shadow', not i_ribbon ? colShadow : colNone, 3)
plot(i_showStoch ? StochD : na, 'Stoch D Shadow', not i_ribbon ? colShadow : colNone, 3)
plot_stochK = plot(i_showStoch ? StochK : na, 'Stoch K', not i_ribbon ? colStochK : colNone, 1)
plot_stochD = plot(i_showStoch ? StochD : na, 'Stoch D', not i_ribbon ? colStochD : colNone, 1)
fill(plot_stochK, plot_stochD, i_ribbon ? colStochFill : na)
// -- PEANUT
isOB = O[1] < O
isOS = O[1] > O
// ดูว่าOB OS
var bool inOB = false
var float highestHigh = na
var int highestBarIndex = na
//เริ่มเงื่อนไขหลัก
// //
// ====== DRAWING and PLOTTING ====== //
// //
////////////////////////////////////////////////////////////////////////////////
// zero median RSI channel hlines
upperx = hline(i_upperx, 'OB Extreme', color.new(color.silver, 60))
upper = hline(i_upper, 'OB', color.new(color.silver, 80))
median = hline(0, 'Median', color.orange, hline.style_dotted)
lower = hline(i_lower, 'OS', color.new(color.silver, 80))
lowerx = hline(i_lowerx, 'OS Extreme', color.new(color.silver, 60))
// channel fill
fill(upper, upperx, color.new(color.red, 90), title = 'Background Fill OB')
fill(upper, lower, color.new(color.blue, 90), title = 'Background Channel')
fill(lower, lowerx, color.new(color.green, 90), title = 'Background Fill OS')
// histogram first, so it is on the bottom of the plot/candle draw stack
plot(i_showHist ? RSI : na, 'RSI Histogram', color.new(color.silver, 80), 1, plot.style_histogram)
// make our HA rsi candles
plotcandle(O, H, L, C, 'HARSI', bodyColour, wickColour, bordercolor = bodyColour)
// RSI overlay plot
plot(i_showPlot ? RSI : na, 'RSI Shadow', colShadow, 3)
plot_rsi = plot(i_showPlot ? RSI : na, 'RSI Overlay', colRSI, 1)
// Stochastic RSI plots and fill
plot(i_showStoch ? StochK : na, 'Stoch K Shadow', not i_ribbon ? colShadow : colNone, 3)
plot(i_showStoch ? StochD : na, 'Stoch D Shadow', not i_ribbon ? colShadow : colNone, 3)
plot_stochK = plot(i_showStoch ? StochK : na, 'Stoch K', not i_ribbon ? colStochK : colNone, 1)
plot_stochD = plot(i_showStoch ? StochD : na, 'Stoch D', not i_ribbon ? colStochD : colNone, 1)
fill(plot_stochK, plot_stochD, i_ribbon ? colStochFill : na)
// -- PEANUT
isOB = O[1] < O
isOS = O[1] > O
// ดูว่าOB OS
var bool inOB = false
var float highestHigh = na
var int highestBarIndex = na
//เริ่มเงื่อนไขหลัก
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.