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

Script

The document outlines a trading strategy script called 'Strategy Chinesa Edit' designed for financial analysis. It includes customizable input options for displaying indicators, colors for moving averages, and conditions for plotting buy and sell signals based on various moving averages and exponential moving averages. The script utilizes security functions to analyze the current ticker's price movements on a one-minute timeframe.

Uploaded by

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

Script

The document outlines a trading strategy script called 'Strategy Chinesa Edit' designed for financial analysis. It includes customizable input options for displaying indicators, colors for moving averages, and conditions for plotting buy and sell signals based on various moving averages and exponential moving averages. The script utilizes security functions to analyze the current ticker's price movements on a one-minute timeframe.

Uploaded by

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

instrument {name ="Strategy Chinesa Edit", short_name ="china / ",

overlay=true}

---Versão Strategy Chinesa Editada por @User_010101

exibir_tracamento = input ( 1, "Deseja exibir?", input.string_selection,


{"Sim","Não"})

input_group { "SMAA", smaa_color = input{ default = "yellow", type =


input.color }}
input_group { "SMAB", smab_color = input{ default = "blue", type =
input.color }}

input_group { "Up", up_color = input{ default = "green", type =


input.color }}
input_group { "Down", Down_color = input{ default = "red", type =
input.color }}

sec = security(current_ticker_id, "1m")

smaa = sma(close, '2')


smab = sma(close, '30')
smaao = sma(open, '3')
smabo = sma(open, '30')

plot(smaa, "SMA", smaa_color)


plot(smab, "SMA", smab_color)

emaa = ema(close, '2')

period = input (12, "front.period", input.integer, 1)

source = input (1, "front.ind.source", input.string_selection,


inputs.titles)
fn = input (1, "front.newind.average", input.string_selection,
averages.titles)

input_group {
"front.newind.barcolors",
up_color = input { default = "#2CAC40", type = input.color },
down_color = input { default = "#DB4931", type = input.color }
}

local sourceSeries = inputs [source]


local averageFunction = averages [fn]

mean = averageFunction (sourceSeries, period)


mad = sourceSeries - mean

rect {
first = 0,
second = mad,
color = mad >= mad [1] and up_color or down_color,
width = 1.0
}

if
( mad <= 0 and ( mad[1] > mad) and (smaa < smab) and (smaao > smabo)
and close <= emaa ) then
plot_shape (1,
"Down",
shape_style.arrowdown,
shape_size.huge,
down_color,
shape_location.abovebar,
0,
" Down ",
1)
end

if
( mad >= 0 and (mad > mad[1]) and (smaa > smab) and close >= emaa and
smaao < smabo)
then
plot_shape (1 ,
"Up",
shape_style.arrowup,
shape_size.huge,
up_color,
shape_location.belowbar,
0,
"Up",
1)

end

You might also like