0% found this document useful (0 votes)
28 views2 pages

Script Chatgpt 2.0.1

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)
28 views2 pages

Script Chatgpt 2.0.1

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/ 2

instrument { name = "CHAT GPT 2.

0", icon="indicators:ADX", overlay = true }


method_id = input (1, "Type", input.string_selection, { "MIGUEL TRADER OB" })

input_group {
"Maxima",
level_1_color = input { default = "red", type = input.color },
level_1_width = input { default = 2, type = input.line_width }
}

input_group {
"Minima",
level_2_color = input { default = "green", type = input.color },
level_2_width = input { default = 2, type = input.line_width }
}

local function m15(candle)


c1 = candle.high
c2 = candle.low
end

local methods = { m15 }

local resolution = "15m"


sec = security (current_ticker_id, resolution)

if sec then
local method = methods [method_id]
method (sec)
plot (c1, "C1", level_1_color, level_1_width, 0, style.levels,
na_mode.continue)
plot (c2, "C2", level_2_color, level_2_width, 0, style.levels,
na_mode.continue)
end

instrument{name="CHAT GPT 2.0",


short_name="MIGUEL TRADER OB",
icon = 'indicators:BB',
overlay=true}

Exibir_tracamento= input(1, "Deseja exibir o tracamento?", input.string_selection,


{"SIM", "NAO"})

input_group {"BANDA SUPERIOR", bbsup_color= input{ default= "silver", type=


input.color}}
input_group {"BANDA INFERIOR", bbinf_color= input{ default= "silver", type=
input.color}}

smaa= sma(close, '20')


upper_band= smaa + (stdev(close,20) * 2.5)
lower_band= smaa - (stdev(close,20) * 2.5)
emaa= ema(close, '100')

if Exibir_tracamento == 1 then
plot(emaa, "SMA", ema_color)
plot(upper_band, "UPPER_BAND", bbsup_color)
plot(lower_band, "LOWER_BAND", bbinf_color)
end

MaFast_period = input(1,"Ma Fast period",input.integer,1,1000,1)


MaValue = input(5,"Ma Value", input.string_selection,inputs.titles)

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 titleValue = inputs[MaValue]


smaFast = sma(titleValue, MaFast_period)
smaSlow = sma(titleValue, MaSlow_period)
buffer1 = smaFast - smaSlow
buffer2 = wma(buffer1, Signal_period)

buyCondition = buffer1 > buffer2 and buffer1[1] < buffer2[1]


sellCondition = buffer1 < buffer2 and buffer1[1] > buffer2[1]

plot_shape(buyCondition, "C", shape_style.triangleup, shape_size.huge, colorBuy,


shape_location.belowbar, -1, "C", "white")
plot_shape(sellCondition, "V", shape_style.triangledown, shape_size.huge,
colorSell, shape_location.abovebar, -1, "V", "white")

You might also like