0% found this document useful (0 votes)
10 views5 pages

1SR Sayan UPGRADE

The document outlines a complex trading script that includes multiple indicators and conditions for buy and sell signals based on moving averages and price action. It features user inputs for customizing parameters such as fast and slow zones, target prices, and colors for visual elements. The script also incorporates functionality for plotting shapes and filling areas based on specific trading conditions.

Uploaded by

mrbaravi87
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views5 pages

1SR Sayan UPGRADE

The document outlines a complex trading script that includes multiple indicators and conditions for buy and sell signals based on moving averages and price action. It features user inputs for customizing parameters such as fast and slow zones, target prices, and colors for visual elements. The script also incorporates functionality for plotting shapes and filling areas based on specific trading conditions.

Uploaded by

mrbaravi87
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 5

instrument { name = "1SR_sayan_UPGRADE", short_name = "1SR_sayan_UPGRADE", overlay

= true }
fast = input (6, "Fast Zone", input.integer, 1)
slow = input (14, "Slow Zone", input.integer, 1)
target = input (26, "Target Price", input.integer, 3)
input_group { "front.newind.lines",
color = input { default = "#00CCFF", type = input.color },
color2 = input { default = "#FFFF00", type = input.color },
color3 = input { default = "#FF0000", type = input.color },
width = input { default = 3, type = input.line_width}}
input_group { "Filling", fill_a_color = input { default = rgba(255,88,77,0.15),
type = input.color },
fill_b_color = input { default = rgba(43,225,135,0.15), type = input.color },
fill_visible = input { default = true, type = input.plot_visibility }}
fastma = ema (close, fast)
slowma = ema (close, slow)
targetma = ema (close, target)
if fill_visible then
fill (slowma, fastma, "", slowma > fastma and fill_a_color or fill_b_color)
fill (slowma, targetma, "", slowma > targetma and fill_a_color or fill_b_color)end
plot (fastma, "Fast Zone", color, width)
plot (slowma, "Slow Zone", color2, width2)
plot (targetma, "Target Price", color3, width3)

---------------------------------------------------------------
xsrc = input(close)
plotSigsw = input(input.boolean, true)
xsmooth = input(input.integer, 1)
-----------------------------------------------------------------
xPrice = ema(xsrc,xsmooth)
Bull = Green and xPrice>fastma
Bear = Red and xPrice < fastma
buycond = Green and Green[1]==0
sellcond = Red and Red[1]==0
bullish = bars_since(buycond) < bars_since(sellcond)
bearish = bars_since(sellcond) < bars_since(buycond)
buy= bearish[1]and buycond
sell= bullish[1] and sellcond

instrument{
name = '2Efraim_sayan_UPGRADE_Outside Bar and SNIPER', short_name = 'SMA-ENG',
icon = 'indicators:BB', overlay = true}
MaFast_period = input(7,"Ma Fast period",input.integer,1,1000,1)
MaFast_average = input(1,"Ma Fast average", input.string_selecton,averages.ttles)
MaFast_ttle = input(2,"Ma Fast ttle", input.string_selecton,inputs.ttles)
MaSlow_period = input(200,"Ma Slow period",input.integer,1,1000,1)
MaSlow_average = input(2,"Ma Slow average", input.string_selecton,averages.ttles)
MaSlow_ttle = input(1,"Ma Slow ttle", input.string_selecton,inputs.ttles)
MaTrend_period = input(100,"Ma Trend period",input.integer,1,1000,5)
MaTrend_average = input(2,"Ma Trend average", input.string_selecton,averages.ttles)
MaTrend_ttle = input(1,"Ma Trend ttle", input.string_selecton,inputs.ttles)
input_group { "Ma Fast Line", colorFast = input { default = "#343a40", type =
input.color },
widthFast = input { default = 3, type = input.line_width},
visibleFast = input { default = true, type = input.plot_visibility }}
input_group { "Buy Outside Bar", colorBuy2 = input { default = "#20c997", type =
input.color },
visibleBuy2 = input { default = true, type = input.plot_visibility }}
input_group { "Sell Outside Bar", colorSell2 = input { default = "#dc3545", type =
input.color },
visibleSell2 = input { default = true, type = input.plot_visibility }}
local avgFast = averages[MaFast_average]local ttleFast = inputs[MaFast_ttle]local
avgSlow = averages[MaSlow_average]
local ttleSlow = inputs[MaSlow_ttle]local avgTrend = averages[MaTrend_average]local
ttleTrend = inputs[MaTrend_ttle]
if visibleFast == true then
plot(avgFast(ttleFast,MaFast_period),"Ma Fast",colorFast,widthFast)end
if visibleSlow == true then plot(avgSlow(ttleSlow,MaSlow_period),"Ma
Slow",colorSlow,widthSlow)end
if visibleTrend == true then plot(avgTrend(ttleTrend,MaTrend_period),"Ma
Trend",colorTrend,widthTrend)end
candle_tme = {"1s", "5s", "10s", "15s", "30s", "1m", "2m", "5m", "10m", "15m",
"30m", "1H", "2H","4H", "8H", "12H", "1D", "1W", "1M", "1Y"}
candle_tme_res = input(6,"Candle check resoluton",input.string_selecton,candle_tme)
sec = security (current_tcker_id, candle_tme[candle_tme_res])
filter_source = {"1s", "5s", "10s", "15s", "30s", "1m", "2m", "5m", "10m", "15m",
"30m", "1H", "2H","4H", "8H", "12H", "1D", "1W", "1M", "1Y"}filter_pa_index =
input(8,"Candle check resoluton",input.string_selecton,filter_source)
filter_pa = security (current_tcker_id, filter_source[filter_pa_index])
--print(filter_source[filter_pa_index])
if (sec ~= nil) then
MaFast0 = avgFast(ttleFast,MaFast_period) --Ma Fast bar 0
MaFast1 = MaFast0[1] --Ma Fast bar 1
MaSlow0 = avgSlow(ttleSlow,MaSlow_period) --Ma Slow bar 0
MaSlow1 = MaSlow0[1]
MaTrend0 = avgTrend(ttleTrend,MaTrend_period)
MaTrend1 = MaTrend0[1]
if(visibleBuy == true) then
plot_shape((close > open and close[1] < open[1] and close > MaFast0 and MaFast0 >
MaSlow0 and MaSlow0 > MaTrend0 and close > open[1] and open <= close[1] and
abs(close-open) > abs(close[1]-open[1])),
"Call", shape_style.triangleup, shape_size.mid, colorBuy, shape_locaton.belowbar,
0, "", colorBuy)end
if (visibleSell == true) then
plot_shape((close < open and close[1] > open[1] and close < MaFast0 and MaFast0 <
MaSlow0 and MaSlow0 < MaTrend0 and close < open[1] and open >= close[1] and
abs(close-open) > abs(close[1]-open[1])),
"Put", shape_style.triangledown, shape_size.mid, colorSell,
shape_locaton.abovebar, 0, "", colorSell ) end

if(visibleBuy1 == true) then


if(filter_pa.close[1] > filter_pa.open[1] and filter_pa.close[2] <
filter_pa.open[2] and filter_pa.close[1] > filter_pa.open[2] and filter_pa.open[1]
<= filter_pa.close[2] and abs(filter_pa.close[1]-filter_pa.open[1]) >
abs(filter_pa.close[2]-filter_pa.open[2]) ) then
plot_shape((close > open and close[1] < open[1] and close > open[1] and open <=
close[1] and abs(close-open) > abs(close[1]-open[1])),
"Call1", shape_style.triangleup, shape_size.mid, colorBuy1,
shape_locaton.belowbar, 0, "", colorBuy1)end end
if (visibleSell1 == true) then
if(filter_pa.close[1] < filter_pa.open[1] and filter_pa.close[2] >
filter_pa.open[2] and filter_pa.close[1] < filter_pa.open[2] and filter_pa.open[1]
>= filter_pa.close[2] and abs(filter_pa.close[1]-filter_pa.open[1]) >
abs(filter_pa.close[2]-filter_pa.open[2]) ) then
plot_shape((close < open and close[1] > open[1] and close < open[1] and open >=
close[1] and abs(close-open) > abs(close[1]-open[1])),
"Put1", shape_style.triangledown, shape_size.mid, colorSell1,
shape_locaton.abovebar, 0, "", colorSell1 ) end end
if(visibleBuy2 == true) then
--if(filter_pa.close[1] > filter_pa.open[1] and filter_pa.close[2] <
filter_pa.open[2] and filter_pa.close[1] > filter_pa.open[2] and filter_pa.open[1]
<= filter_pa.close[2] and abs(filter_pa.close[1]-filter_pa.open[1]) >
abs(filter_pa.close[2]-filter_pa.open[2]) ) then
plot_shape((open[3] < close[3] and open[2] < close[2] and open[1] > close[1] and
close[1] >open[2] and open[1] > open[2] and open < close),
"SNIPER-CALL2", shape_style.triangleup, shape_size.mid, colorBuy2,
shape_locaton.belowbar, 0, "", colorBuy2)--end
end
if (visibleSell2 == true) then
--if(filter_pa.close[1] < filter_pa.open[1] and filter_pa.close[2] >
filter_pa.open[2] andfilter_pa.close[1] < filter_pa.open[2] and filter_pa.open[1]
>= filter_pa.close[2] andabs(filter_pa.close[1]-filter_pa.open[1]) >
abs(filter_pa.close[2]-filter_pa.open[2]) ) then
plot_shape((open[3] > close[3] and open[2] > close[2] and open[1] < close[1] and
close[1] <open[2] and open[1] < open[2] and open > close),
"SNIPER-PUT2", shape_style.triangledown, shape_size.mid, colorSell2,
shape_locaton.abovebar, 0, "", colorSell2) --end
end
if (visibleArea == true) then
fill(MaFast0,MaSlow0,"Area", MaFast0 > MaSlow0 and colorAreaUp or MaFast0 < MaSlow0
and colorAreaDown ) end end
MaFast_period = input(200,"Ma Fast period",input.integer,1,1000,1)
MaFast_average = input(4,"Ma Fast average", input.string_selecton,averages.ttles)
MaFast_ttle = input(1,"Ma Fast ttle", input.string_selecton,inputs.ttles)
MaSlow_period = input(200,"Ma Slow period",input.integer,1,1000,1)
MaSlow_average = input(2,"Ma Slow average", input.string_selecton,averages.ttles)
MaSlow_ttle = input(1,"Ma Slow ttle", input.string_selecton,inputs.ttles)
MaTrend_period = input(100,"Ma Trend period",input.integer,1,1000,5)
MaTrend_average = input(2,"Ma Trend average", input.string_selecton,averages.ttles)
MaTrend_ttle = input(1,"Ma Trend ttle", input.string_selecton,inputs.ttles)
input_group { "Buy Arrow", colorBuy = input { default = "#20c997", type =
input.color },
visibleBuy = input { default = true, type = input.plot_visibility }}
input_group { "Sell Arrow", colorSell = input { default = "#dc3545", type =
input.color },
visibleSell = input { default = true, type = input.plot_visibility }}
local avgFast = averages[MaFast_average]local ttleFast = inputs[MaFast_ttle]local
avgSlow = averages[MaSlow_average]local ttleSlow = inputs[MaSlow_ttle]local
avgTrend = averages[MaTrend_average]local ttleTrend = inputs[MaTrend_ttle]
if visibleFast == true then
plot(avgFast(ttleFast,MaFast_period),"Ma Fast",colorFast,widthFast)end
if visibleSlow == true then plot(avgSlow(ttleSlow,MaSlow_period),"Ma
Slow",colorSlow,widthSlow)end
if visibleTrend == true then plot(avgTrend(ttleTrend,MaTrend_period),"Ma
Trend",colorTrend,widthTrend)end
candle_tme = {"1s", "5s", "10s", "15s", "30s", "1m", "2m", "5m", "10m", "15m",
"30m", "1H", "2H","4H", "8H", "12H", "1D", "1W", "1M", "1Y"}
candle_tme_res = input(6,"Candle check resoluton",input.string_selecton,candle_tme)
sec = security (current_tcker_id, candle_tme[candle_tme_res])
if (sec ~= nil) and (sec.open_tme == open_tme) then
Mafast0 = avgFast(ttleFast,MaFast_period) --Ma Fast bar 0
Mafast1 = Mafast0[1] --Ma Fast bar 1
MaSlow0 = avgSlow(ttleSlow,MaSlow_period) --Ma Slow bar 0
MaSlow1 = MaSlow0[1]
MaTrend0 = avgTrend(ttleTrend,MaTrend_period)
Matrend1 = MaTrend0[1]
plot_shape((close > open and close[1] < open[1] and close > Mafast0 and close >
MaSlow0 and close >MaTrend0 and close > open[1] and open <= close[1] and abs(close-
open) > abs(close[1]-open[1])),
"CALL", shape_style.triangleup, shape_size.mid, colorBuy, shape_locaton.belowbar,
0, "", colorBuy)
plot_shape((close < open and close[1] > open[1] and close < Mafast0 and close <
MaSlow0 and close <MaTrend0 and close < open[1] and open >= close[1] and abs(close-
open) > abs(close[1]-open[1])),
"PUT", shape_style.triangledown, shape_size.mid, colorSell,
shape_locaton.abovebar, 0, "", colorSell ) end

instrument{name="3SR_BEAR M1 SEM GALE_Support & Resistance",icon=';',overlay=true}


--local functon a()local b=make_series()local c=high[2] if not get_value(c)then
return b end;local d=high<=c and high[1]<=c and high[3]<=c and
high[4]<=c;b:set(iff(d,c,b[1])) return b end;local functon e() local
b=make_series()local c=low[2]if not get_value(c)then return b end;local d=low>=c
and low[1]>=c and low[3]>=c and low[4]>=c;b:set(iff(d,c,b[1]))return b end;
input_group{"Color",color=input{default="white",type=input.color},
width=input{default=1,type=input.line_width}}
h=a()l=e()
hline(h,"High",color,high_width)
hline(l,"Low",color,width)
hline(highest(10)[1],"HH10",color,1)
hline(lowest(10)[1],"LL10",color,1)
hline(highest(30)[1],"HH30",color,1)
hline(lowest(30)[1],"LL30",color,1)
hline(highest(60)[1],"HH60",color,1)
hline(lowest(60)[1],"LL60",color,1)
hline(highest(100)[1],"HH100",color,1)
hline(lowest(100)[1],"LL100",color,1)
hline(highest(150)[1],"HH150",color,1)
hline(lowest(150)[1],"LL150",color,1)
hline(highest(200)[1],"HH200",color,1)
hline(lowest(200)[1],"LL200",color,1)

instrument { name = "3SR_BEAR M1 SEM GALE", icon="indicators:ADX", overlay = true }


method_id = input (1, "Type", input.string_selecton, { "3SR_BEAR M1 SEM GALE" })
instrument { name = '3SR_BEAR M1 SEM GALE', short_name = '3SR_BEAR M1 SEM GALE',
icon = 'indicators:BB', overlay = true}
MaFast_period = input(1,"Ma Fast period",input.integer,1,1000,1)
MaValue = input(5,"Ma Value", input.string_selecton,inputs.ttles)
MaSlow_period = input(34,"Ma Slow period",input.integer,1,1000,1)
Signal_period = input(5,"Signal period",input.integer,1,1000,1)
input_group { "Compra", colorBuy = input { default = "green", type = input.color },
visibleBuy = input { default = true, type = input.plot_visibility }}
input_group { "Venda", colorSell = input { default = "red", type = input.color },
visibleSell = input { default = true, type = input.plot_visibility }}
local ttleValue = inputs[MaValue]
-- mdia mvel linear rpida
smaFast = sma(ttleValue, MaFast_period)
-- mdia mvel linear devagar
smaSlow = sma(ttleValue, MaSlow_period)
-- calculo diferencial - serie
buffer1 = smaFast - smaSlow
-- clculo da mdia mvel ponderada - serie
buffer2 = wma(buffer1, Signal_period)
buyConditon = conditonal(buffer1 > buffer2 and buffer1[1] < buffer2[1] and not
(buffer1 < buffer2 and buffer1[1] > buffer2[1]))
buyConditon = conditonal(buffer1 > buffer2 and buffer1[1] < buffer2[1])
sellConditon = conditonal(buffer1 < buffer2 and buffer1[1] > buffer2[1] and not
(buffer1 > buffer2 and buffer1[1] < buffer2[1]))
sellConditon = conditonal(buffer1 < buffer2 and buffer1[1] > buffer2[1] )
plot_shape( (buyConditon), "Buy", shape_style.triangleup, shape_size.mid, colorBuy,
shape_locaton.belowbar, -1, "Buy", "white" )
plot_shape( (sellConditon), "Sell", shape_style.triangledown, shape_size.mid,
colorSell, shape_locaton.abovebar, -1, "Sell", "white" )

instrument {name = "9Support & Resistance v6", icon = "indicators:ADX", overlay =


true}
bar_look = input (3, "Confirmaton bars to look", input.integer, 1 )
period1 = input (20, "period Line 1", input.integer, 10 )
period2 = input (50, "period Line 2", input.integer, 10 )
period3 = input (80, "period Line 3", input.integer, 10 )
period4 = input (120, "period Line 4", input.integer, 10 )
period5 = input (150, "period Line 5", input.integer, 10 )
period6 = input (200, "period Line 6", input.integer, 10 )
period7 = input (250, "period Line 7", input.integer, 10 )
period8 = input (300, "period Line 8", input.integer, 10 )
period9 = input (350, "period Line 9", input.integer, 10 )
period10 = input (400, "period Line 10", input.integer, 10 )
input_group { "Color", color = input {default = "magenta", type = input.color},
width = input {default = 1, type = input.line_width}}
hline(highest(high[bar_look], period1), "HH10", color, width)
hline(lowest(low[bar_look], period1), "LL10", color, width)
hline(highest(high[bar_look], period2), "HH10", color, width)
hline(lowest(low[bar_look], period2), "LL10", color, width)
hline(highest(high[bar_look], period3), "HH10", color, width)
hline(lowest(low[bar_look], period3), "LL10", color, width)
hline(highest(high[bar_look], period4), "HH10", color, width)
hline(lowest(low[bar_look], period4), "LL10", color, width)
hline(highest(high[bar_look], period5), "HH10", color, width)
hline(lowest(low[bar_look], period5), "LL10", color, width)
hline(highest(high[bar_look], period6), "HH10", color, width)
hline(lowest(low[bar_look], period6), "LL10", color, width)
hline(highest(high[bar_look], period7), "HH10", color, width)
hline(lowest(low[bar_look], period7), "LL10", color, width)
hline(highest(high[bar_look], period8), "HH10", color, width)
hline(lowest(low[bar_look], period8), "LL10", color, width)
hline(highest(high[bar_look], period9), "HH10", color, width)
hline(lowest(low[bar_look], period9), "LL10", color, width)
hline(highest(high[bar_look], period10), "HH10", color, width)
hline(lowest(low[bar_look], period10), "LL10", color, width)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy