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

Profit Max

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

Profit Max

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="PROFIT MAX",

short_name="@PROFITMAX",
icon = 'https://i.postimg.cc/J0Lq5F4s/pm.png',
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

instrument {
name = 'PROFITMAX',
short_name = 'PM',
icon = 'https://i.postimg.cc/J0Lq5F4s/pm.png',
overlay = true
}

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


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

MaSlow_period = input(30,"Ma Slow period",input.integer,1,1000,1)

Signal_period = input(4,"Signal period",input.integer,1,1000,1)

input_group {
"CALL NEXT",
colorBuy = input { default = "green", type = input.color },
visibleBuy = input { default = true, type = input.plot_visibility }
}

input_group {
"PUT NEXT",
colorSell = input { default = "red", type = input.color },
visibleSell = input { default = true, type = input.plot_visibility }
}

local titleValue = inputs[MaValue]

-- mdia mvel linear rpida


smaFast = sma(titleValue, MaFast_period)
-- mdia mvel linear devagar
smaSlow = sma(titleValue, MaSlow_period)

-- calculo diferencial - serie


buffer1 = smaFast - smaSlow

-- clculo da mdia mvel ponderada - serie


buffer2 = wma(buffer1, Signal_period)

buyCondition = conditional(buffer1 > buffer2 and buffer1[1] < buffer2[1] and not
(buffer1 < buffer2 and buffer1[1] > buffer2[1]))
buyCondition = conditional(buffer1 > buffer2 and buffer1[1] < buffer2[1])

sellCondition = conditional(buffer1 < buffer2 and buffer1[1] > buffer2[1] and not
(buffer1 > buffer2 and buffer1[1] < buffer2[1]))
sellCondition = conditional(buffer1 < buffer2 and buffer1[1] > buffer2[1] )

plot_shape(
(buyCondition),
"",
shape_style.triangleup,
shape_size.huge,
colorBuy,
shape_location.belowbar,
-1,
"CALL NEXT",
"green"
)

plot_shape(
(sellCondition),
"ENTER",
shape_style.triangledown,
shape_size.huge,
colorSell,
shape_location.abovebar,
-1,
"PUT NEXT",
"red"
)

You might also like