Two-Pole Oscillator [BigBeluga] For ThinkOrSwim

Lukhy11

New member
2019 Donor
VIP
Author states: The Two-Pole Oscillator is an advanced smoothing oscillator designed to provide traders with precise market signals by leveraging deviation-based calculations combined with a unique two-pole filtering technique. It offers clear visual representation and actionable signals for smart trading decisions.

๐Ÿ”ตHow It Works:
  • The oscillator calculates price deviation from a mean value and applies two-pole filtering to smooth the resulting signal.
  • Gradient-colored signals reflect their strength, with transparency indicating proximity to the 0 level on the oscillator scale.
  • Buy and sell signals are generated based on crossovers and crossunders of the oscillator line with a signal line.
  • If a level is crossed, the corresponding signal is marked with a "X" plotted on the chart at the crossover point.

๐Ÿ”ตUse Cases:
  • Detecting overbought or oversold market conditions with a smoother, noise-free oscillator.
  • Using invalidation levels to set clear stop-loss or trade exit points.
  • Identifying strong momentum signals and filtering out weaker, less reliable ones.
  • Combining oscillator signals with price action for more precise trade entries and exits.
9fv8Yw6.png


Here is the original Tradingview code:
https://www.tradingview.com/script/2Ssn4yDZ-Two-Pole-Oscillator-BigBeluga/


For the new ThinkOrSwim code, you must scroll down to the next post
 
Last edited by a moderator:
  • I'm watching this!
Reactions: sum
Hi, All just wondering if anybody can convert this tradingview script by Big Beluga called Two Pole Oscillator?

https://www.tradingview.com/script/2Ssn4yDZ-Two-Pole-Oscillator-BigBeluga/


// This work is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
// https://creativecommons.org/licenses/by-nc-sa/4.0/
// ยฉ BigBeluga
//@version=6
indicator("Two-Pole Oscillator [BigBeluga]", max_labels_count = 500, max_lines_count = 500)
// ๏ผฉ๏ผฎ๏ผฐ๏ผต๏ผด๏ผณ โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•{
int length = input.int(20, minval=1, title="Filter Length")
bool disp_lvl = input.bool(true, "Levels")
color up_color = input.color(#55ffda, "", inline = "color")
color dn_color = input.color(#8c5bff, "", inline = "color")
var buy_line = line(na)
var sell_line = line(na)
// }

// ๏ผฃ๏ผก๏ผฌ๏ผฃ๏ผต๏ผฌ๏ผก๏ผด๏ผฉ๏ผฏ๏ผฎ๏ผณโ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•{
float sma1 = ta.sma(close, 25)
float sma_n1 = ((close - sma1) - ta.sma(close - sma1, 25)) / ta.stdev(close - sma1, 25)
float area = ta.sma(high-low, 100)
// Two-pole smooth filter function
f_two_pole_filter(source, length) =>
var float smooth1 = na
var float smooth2 = na
alpha = 2.0 / (length + 1)
if na(smooth1)
smooth1 := source
else
smooth1 := (1 - alpha) * smooth1 + alpha * source
if na(smooth2)
smooth2 := smooth1
else
smooth2 := (1 - alpha) * smooth2 + alpha * smooth1
// Oscillator
two_p = f_two_pole_filter(sma_n1, length)
two_pp = two_p[4]
// Colors
color buy_col1 = color.from_gradient(two_p, -1, 0.5, up_color, na)
color buy_col2 = color.from_gradient(two_p, -1, 0.5, color.new(up_color, 50), na)
color sell_col1 = color.from_gradient(two_p, -0.5, 1, na, dn_color)
color sell_col2 = color.from_gradient(two_p, -0.5, 1, na, color.new(dn_color, 50))
color color = two_p > two_pp
? color.from_gradient(two_p, -1,1, up_color, color.new(up_color, 0))
: color.from_gradient(two_p, -1,1,color.new(dn_color, 0), dn_color)

// Signals
bool buy = ta.crossover(two_p, two_pp) and two_p < 0 and barstate.isconfirmed
bool sell = ta.crossunder(two_p, two_pp) and two_p > 0 and barstate.isconfirmed
// }

// ๏ผฐ๏ผฌ๏ผฏ๏ผด โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•โ€•{
if buy //and two_p < -0.5
sell_line := line(na)
if disp_lvl
buy_line := line.new(
bar_index-1
, low[1] - area
, bar_index
, low[1] - area
, force_overlay = true
, color = buy_col1
, style = line.style_dashed
)
label.new(bar_index-1, low[1] - area
, color = buy_col1, style = label.style_label_up, force_overlay = true, size = size.tiny)
if ta.crossunder(low, buy_line.get_y1()) and barstate.isconfirmed
label.new(
bar_index-1
, buy_line.get_y1()
, color = color.new(up_color, 100)
, style = label.style_label_center
, force_overlay = true
, size = size.large
, text = "โœ–"
, textcolor = up_color
)
buy_line := line(na)
if sell //and two_p > 0.5
buy_line := line(na)
if disp_lvl
sell_line := line.new(
bar_index-1
, high[1] + area
, bar_index
, high[1] + area
, force_overlay = true
, color = sell_col1
, style = line.style_dashed
)
label.new(bar_index-1, high[1] + area
, color = sell_col1, style = label.style_label_down, force_overlay = true, size = size.tiny)
if ta.crossover(high, sell_line.get_y1()) and barstate.isconfirmed
label.new(
bar_index-1
, sell_line.get_y1()
, color = color.new(dn_color, 100)
, style = label.style_label_center
, force_overlay = true
, size = size.large
, text = "โœ–"
, textcolor = dn_color
)
sell_line := line(na)
switch
not na(buy_line) => buy_line. set_x2(bar_index)
not na(sell_line) => sell_line.set_x2(bar_index)
plotshape(buy ? two_p[1] : na, "Buy", shape.circle, location.absolute, buy_col2, -1, size = size.small)
plotshape(buy ? two_p[1] : na, "Buy", shape.circle, location.absolute, buy_col1, -1, size = size.tiny)
plotshape(sell ? two_p[1] : na, "Sell", shape.circle, location.absolute, sell_col2, -1, size = size.small)
plotshape(sell ? two_p[1] : na, "Sell", shape.circle, location.absolute, sell_col1, -1, size = size.tiny)
p11 = plot(1, color = color.new(chart.fg_color, 80))
plot(0.5, color = color.new(chart.fg_color, 50))
p00 = plot(0, color = color.new(bar_index % 2 == 0 ? chart.fg_color : na, 0))
plot(-0.5, color = color.new(chart.fg_color, 50))
p_1 = plot(-1, color = color.new(chart.fg_color, 80))
fill(p11, p00, 2, -1, color.new(chart.fg_color, 80), na)
fill(p_1, p00, 1, -2, na, color.new(chart.fg_color, 80))

p1 = plot(two_p, color = color, linewidth = 1)
p2 = plot(two_pp, display = display.none)
fill(p1, p2, two_p, two_pp, color, na)
// }
check below Upper & lower Study:

Upper Study:

CSS:
#// Indicator for TOS
#// ยฉ BigBeluga
#indicator("Two-Pole Oscillator [BigBeluga]"
# Converted by Sam4Cok@Samer800    - 02/2025

input source = close;
input FilterLength = 20;


def na = Double.NaN;
def last = IsNaN(close);

#/ ๏ผฃ๏ผก๏ผฌ๏ผฃ๏ผต๏ผฌ๏ผก๏ผด๏ผฉ๏ผฏ๏ผฎ๏ผณ
def hl = High - Low;
def sma  = Average(source, 25);
def sma1 = Average(source - sma, 25);
def stdv = StDev(source - sma, 25);
def sma_n1 = (source - sma - sma1) / stdv;
def area   = Average(hl, 100);

#// Two-pole smooth filter function
Script f_two_pole_filter {
input source = close;
input length = 20;
    def bar = CompoundValue(1, BarNumber(), 1);
    def alpha = 2.0 / (length + 1);
    def smooth1 = if isNaN(smooth1[1]) then source else if !smooth1[1] then source else
                  (1 - alpha) * smooth1[1] + alpha * source;
    def smooth2 = if isNaN(smooth2[1]) then smooth1 else if !smooth2[1] then smooth1 else
                  (1 - alpha) * smooth2[1] + alpha * smooth1;
    plot out = if bar > 0 then smooth2 else Double.NaN;
}
#// Oscillator
def two_p = f_two_pole_filter(sma_n1, FilterLength);
def two_pp = two_p[4];
def twp_ppp = (two_pp + two_p)/2;

#// Signals
def buy  = (two_p > two_pp) and (two_p[1] <= two_pp[1]) and two_p < 0 and !last;
def sell = (two_p < two_pp) and (two_p[1] >= two_pp[1]) and two_p > 0 and !last;

#-- Lines
def buy_line = if buy then low[1] - area else if sell then na else
               if low < buy_line[1] then na else buy_line[1];
def sell_line = if sell then high[1] + area else if buy then na else
                if high > sell_line[1] then na else sell_line[1];

#-- plots
plot crosUp = if low[-1] < buy_line then buy_line else na;
plot crosDn = if high[-1] > sell_line then sell_line else na;
plot sigUp1 = if buy [-1] then buy_line [-1] else na;
plot sigDn1 = if sell[-1] then sell_line[-1] else na;
plot sigUp  = if buy [-1] then buy_line [-1] else na;
plot sigDn  = if sell[-1] then sell_line[-1] else na;
plot buyLine = if buy_line[-1] then buy_line[-1] else na;
plot sellLine = if sell_line[-1] then sell_line[-1] else na;

crosUp.SetPaintingStrategy(PaintingStrategy.LINE_VS_SQUARES);
crosDn.SetPaintingStrategy(PaintingStrategy.LINE_VS_SQUARES);
crosUp.SetDefaultColor(Color.CYAN);
crosDn.SetDefaultColor(Color.MAGENTA);
sigUp.SetLineWeight(3);
sigDn.SetLineWeight(3);
sigUp1.SetDefaultColor(Color.DARK_GRAY);
sigDn1.SetDefaultColor(Color.DARK_GRAY);
sigUp.SetDefaultColor(Color.CYAN);
sigDn.SetDefaultColor(Color.MAGENTA);
sigUp.SetPaintingStrategy(PaintingStrategy.LINE_VS_POINTS);
sigDn.SetPaintingStrategy(PaintingStrategy.LINE_VS_POINTS);
sigUp1.SetPaintingStrategy(PaintingStrategy.POINTS);
sigDn1.SetPaintingStrategy(PaintingStrategy.POINTS);

buyLine.SetPaintingStrategy(PaintingStrategy.DASHES);
sellLine.SetPaintingStrategy(PaintingStrategy.DASHES);
buyLine.SetDefaultColor(Color.CYAN);
sellLine.SetDefaultColor(Color.MAGENTA);

#-- END of CODE

Lower Study:

CSS:
#// Indicator for TOS
#// ยฉ BigBeluga
#indicator("Two-Pole Oscillator [BigBeluga]"
# Converted by Sam4Cok@Samer800    - 02/2025
Declare lower;

input source = close;
input FilterLength = 20;


def na = Double.NaN;
def last = IsNaN(close);

#/ ๏ผฃ๏ผก๏ผฌ๏ผฃ๏ผต๏ผฌ๏ผก๏ผด๏ผฉ๏ผฏ๏ผฎ๏ผณ
def sma  = Average(source, 25);
def sma1 = Average(source - sma, 25);
def stdv = StDev(source - sma, 25);
def sma_n1 = (source - sma - sma1) / stdv;

#// Two-pole smooth filter function
Script f_two_pole_filter {
input source = close;
input length = 20;
    def bar = CompoundValue(1, BarNumber(), 1);
    def alpha = 2.0 / (length + 1);
    def smooth1 = if isNaN(smooth1[1]) then source else if !smooth1[1] then source else
                  (1 - alpha) * smooth1[1] + alpha * source;
    def smooth2 = if isNaN(smooth2[1]) then smooth1 else if !smooth2[1] then smooth1 else
                  (1 - alpha) * smooth2[1] + alpha * smooth1;
    plot out = if bar > 0 then smooth2 else Double.NaN;
}
#// Oscillator
def two_p = f_two_pole_filter(sma_n1, FilterLength);
def two_pp = two_p[4];
def twp_ppp = (two_pp + two_p)/2;

#// Signals
def buy  = (two_p > two_pp) and (two_p[1] <= two_pp[1]) and two_p < 0 and !last;
def sell = (two_p < two_pp) and (two_p[1] >= two_pp[1]) and two_p > 0 and !last;

plot sigUp1 = if buy[-1] then two_p[1] else na;
plot sigDn1 = if sell[-1] then two_p[1] else na;
plot sigUp = if buy[-1] then two_p[1] else na;
plot sigDn = if sell[-1] then two_p[1] else na;
sigUp.SetLineWeight(3);
sigDn.SetLineWeight(3);
sigUp1.SetDefaultColor(Color.DARK_GRAY);
sigDn1.SetDefaultColor(Color.DARK_GRAY);
sigUp.SetDefaultColor(Color.CYAN);
sigDn.SetDefaultColor(Color.MAGENTA);
sigUp.SetPaintingStrategy(PaintingStrategy.LINE_VS_POINTS);
sigDn.SetPaintingStrategy(PaintingStrategy.LINE_VS_POINTS);
sigUp1.SetPaintingStrategy(PaintingStrategy.POINTS);
sigDn1.SetPaintingStrategy(PaintingStrategy.POINTS);

#-- plots
plot tpl = if !last then two_p else na;
plot p11 = if !last then 1 else na;
plot p1  = if !last then 0.5 else na;
plot p00 = if !last then 0 else na;
plot p_1 = if !last then -0.5 else na;
plot p_11 = if !last then -1 else na;

tpl.SetLineWeight(2);
tpl.AssignValueColor(if two_p > two_pp then Color.CYAN else Color.MAGENTA);
p1.SetPaintingStrategy(PaintingStrategy.DASHES);
p_1.SetPaintingStrategy(PaintingStrategy.DASHES);
p00.SetStyle(Curve.SHORT_DASH);
p11.SetDefaultColor(Color.DARK_GRAY);
p1.SetDefaultColor(Color.GRAY);
p00.SetDefaultColor(Color.LIGHT_GRAY);
p_1.SetDefaultColor(Color.GRAY);
p_11.SetDefaultColor(Color.DARK_GRAY);

AddCloud(tpl, two_pp, CreateColor(0, 128, 128), Color.PLUM);
AddCloud(tpl, twp_ppp, Color.CYAN, Color.MAGENTA);
AddCloud(p11, p1, Color.DARK_GRAY);
AddCloud(p_1, p_11, Color.DARK_GRAY);

#-- END of CODE
 
check below Upper & lower Study:

Upper Study:

CSS:
#// Indicator for TOS
#// ยฉ BigBeluga
#indicator("Two-Pole Oscillator [BigBeluga]"
# Converted by Sam4Cok@Samer800    - 02/2025

input source = close;
input FilterLength = 20;


def na = Double.NaN;
def last = IsNaN(close);

#/ ๏ผฃ๏ผก๏ผฌ๏ผฃ๏ผต๏ผฌ๏ผก๏ผด๏ผฉ๏ผฏ๏ผฎ๏ผณ
def hl = High - Low;
def sma  = Average(source, 25);
def sma1 = Average(source - sma, 25);
def stdv = StDev(source - sma, 25);
def sma_n1 = (source - sma - sma1) / stdv;
def area   = Average(hl, 100);

#// Two-pole smooth filter function
Script f_two_pole_filter {
input source = close;
input length = 20;
    def bar = CompoundValue(1, BarNumber(), 1);
    def alpha = 2.0 / (length + 1);
    def smooth1 = if isNaN(smooth1[1]) then source else if !smooth1[1] then source else
                  (1 - alpha) * smooth1[1] + alpha * source;
    def smooth2 = if isNaN(smooth2[1]) then smooth1 else if !smooth2[1] then smooth1 else
                  (1 - alpha) * smooth2[1] + alpha * smooth1;
    plot out = if bar > 0 then smooth2 else Double.NaN;
}
#// Oscillator
def two_p = f_two_pole_filter(sma_n1, FilterLength);
def two_pp = two_p[4];
def twp_ppp = (two_pp + two_p)/2;

#// Signals
def buy  = (two_p > two_pp) and (two_p[1] <= two_pp[1]) and two_p < 0 and !last;
def sell = (two_p < two_pp) and (two_p[1] >= two_pp[1]) and two_p > 0 and !last;

#-- Lines
def buy_line = if buy then low[1] - area else if sell then na else
               if low < buy_line[1] then na else buy_line[1];
def sell_line = if sell then high[1] + area else if buy then na else
                if high > sell_line[1] then na else sell_line[1];

#-- plots
plot crosUp = if low[-1] < buy_line then buy_line else na;
plot crosDn = if high[-1] > sell_line then sell_line else na;
plot sigUp1 = if buy [-1] then buy_line [-1] else na;
plot sigDn1 = if sell[-1] then sell_line[-1] else na;
plot sigUp  = if buy [-1] then buy_line [-1] else na;
plot sigDn  = if sell[-1] then sell_line[-1] else na;
plot buyLine = if buy_line[-1] then buy_line[-1] else na;
plot sellLine = if sell_line[-1] then sell_line[-1] else na;

crosUp.SetPaintingStrategy(PaintingStrategy.LINE_VS_SQUARES);
crosDn.SetPaintingStrategy(PaintingStrategy.LINE_VS_SQUARES);
crosUp.SetDefaultColor(Color.CYAN);
crosDn.SetDefaultColor(Color.MAGENTA);
sigUp.SetLineWeight(3);
sigDn.SetLineWeight(3);
sigUp1.SetDefaultColor(Color.DARK_GRAY);
sigDn1.SetDefaultColor(Color.DARK_GRAY);
sigUp.SetDefaultColor(Color.CYAN);
sigDn.SetDefaultColor(Color.MAGENTA);
sigUp.SetPaintingStrategy(PaintingStrategy.LINE_VS_POINTS);
sigDn.SetPaintingStrategy(PaintingStrategy.LINE_VS_POINTS);
sigUp1.SetPaintingStrategy(PaintingStrategy.POINTS);
sigDn1.SetPaintingStrategy(PaintingStrategy.POINTS);

buyLine.SetPaintingStrategy(PaintingStrategy.DASHES);
sellLine.SetPaintingStrategy(PaintingStrategy.DASHES);
buyLine.SetDefaultColor(Color.CYAN);
sellLine.SetDefaultColor(Color.MAGENTA);

#-- END of CODE

Lower Study:

CSS:
#// Indicator for TOS
#// ยฉ BigBeluga
#indicator("Two-Pole Oscillator [BigBeluga]"
# Converted by Sam4Cok@Samer800    - 02/2025
Declare lower;

input source = close;
input FilterLength = 20;


def na = Double.NaN;
def last = IsNaN(close);

#/ ๏ผฃ๏ผก๏ผฌ๏ผฃ๏ผต๏ผฌ๏ผก๏ผด๏ผฉ๏ผฏ๏ผฎ๏ผณ
def sma  = Average(source, 25);
def sma1 = Average(source - sma, 25);
def stdv = StDev(source - sma, 25);
def sma_n1 = (source - sma - sma1) / stdv;

#// Two-pole smooth filter function
Script f_two_pole_filter {
input source = close;
input length = 20;
    def bar = CompoundValue(1, BarNumber(), 1);
    def alpha = 2.0 / (length + 1);
    def smooth1 = if isNaN(smooth1[1]) then source else if !smooth1[1] then source else
                  (1 - alpha) * smooth1[1] + alpha * source;
    def smooth2 = if isNaN(smooth2[1]) then smooth1 else if !smooth2[1] then smooth1 else
                  (1 - alpha) * smooth2[1] + alpha * smooth1;
    plot out = if bar > 0 then smooth2 else Double.NaN;
}
#// Oscillator
def two_p = f_two_pole_filter(sma_n1, FilterLength);
def two_pp = two_p[4];
def twp_ppp = (two_pp + two_p)/2;

#// Signals
def buy  = (two_p > two_pp) and (two_p[1] <= two_pp[1]) and two_p < 0 and !last;
def sell = (two_p < two_pp) and (two_p[1] >= two_pp[1]) and two_p > 0 and !last;

plot sigUp1 = if buy[-1] then two_p[1] else na;
plot sigDn1 = if sell[-1] then two_p[1] else na;
plot sigUp = if buy[-1] then two_p[1] else na;
plot sigDn = if sell[-1] then two_p[1] else na;
sigUp.SetLineWeight(3);
sigDn.SetLineWeight(3);
sigUp1.SetDefaultColor(Color.DARK_GRAY);
sigDn1.SetDefaultColor(Color.DARK_GRAY);
sigUp.SetDefaultColor(Color.CYAN);
sigDn.SetDefaultColor(Color.MAGENTA);
sigUp.SetPaintingStrategy(PaintingStrategy.LINE_VS_POINTS);
sigDn.SetPaintingStrategy(PaintingStrategy.LINE_VS_POINTS);
sigUp1.SetPaintingStrategy(PaintingStrategy.POINTS);
sigDn1.SetPaintingStrategy(PaintingStrategy.POINTS);

#-- plots
plot tpl = if !last then two_p else na;
plot p11 = if !last then 1 else na;
plot p1  = if !last then 0.5 else na;
plot p00 = if !last then 0 else na;
plot p_1 = if !last then -0.5 else na;
plot p_11 = if !last then -1 else na;

tpl.SetLineWeight(2);
tpl.AssignValueColor(if two_p > two_pp then Color.CYAN else Color.MAGENTA);
p1.SetPaintingStrategy(PaintingStrategy.DASHES);
p_1.SetPaintingStrategy(PaintingStrategy.DASHES);
p00.SetStyle(Curve.SHORT_DASH);
p11.SetDefaultColor(Color.DARK_GRAY);
p1.SetDefaultColor(Color.GRAY);
p00.SetDefaultColor(Color.LIGHT_GRAY);
p_1.SetDefaultColor(Color.GRAY);
p_11.SetDefaultColor(Color.DARK_GRAY);

AddCloud(tpl, two_pp, CreateColor(0, 128, 128), Color.PLUM);
AddCloud(tpl, twp_ppp, Color.CYAN, Color.MAGENTA);
AddCloud(p11, p1, Color.DARK_GRAY);
AddCloud(p_1, p_11, Color.DARK_GRAY);

#-- END of CODE
Thanks Samer800
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
513 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • โ€˜Buy The Dipโ€™ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top