Professional Documents
Culture Documents
Sayan 2.0
Sayan 2.0
0
at https://mozilla.org/MPL/2.0/
// © ramneet_saini
//@version=5
indicator("Sayan", overlay=true)
// SuperTrend 1
Periods1 = input.int(title="ATR Period", defval=60, group='SuperTrend 1')
src1 = input.source(hl2, title="Source", group='SuperTrend 1')
Multiplier1 = input.float(title="ATR Multiplier", step=0.1, defval=2.0,
group='SuperTrend 1')
changeATR1 = input.bool(title="Change ATR Calculation Method ?", defval=true,
group='SuperTrend 1')
// SuperTrend 2
Periods2 = input.int(title="ATR Period", defval=60, group='SuperTrend 2')
src2 = input.source(hl2, title="Source", group='SuperTrend 2')
Multiplier2 = input.float(title="ATR Multiplier", step=0.1, defval=4.0,
group='SuperTrend 2')
changeATR2 = input.bool(title="Change ATR Calculation Method ?", defval=true,
group='SuperTrend 2')
// Initializing parameters
src = input.source(title='Source', defval=close, group ="RSI + BB (EMA) +
Dispersion (2.0)") // Set the price type for calculations
for_rsi = input.int(title='RSI_period', defval=14, group ="RSI + BB (EMA) +
Dispersion (2.0)") // Period for RSI
for_ma = input.int(title='Basis_BB', defval=20, group ="RSI + BB (EMA) + Dispersion
(2.0)") // Period for MA inside BB
for_mult = input.int(title='Stdev', defval=2, minval=1, maxval=5, group ="RSI + BB
(EMA) + Dispersion (2.0)") // Number of standard deviations for BB
for_sigma = input.float(title='Dispersion', defval=0.1, minval=0.01, maxval=1,
group ="RSI + BB (EMA) + Dispersion (2.0)") // Dispersion around MA
if buy
buyC := 1
if sell
sellC := 1
if buy_exit
buyC := 0
if sell_exit
sellC := 0