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

Script Mike

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)
35 views5 pages

Script Mike

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 = "SCRIPT MIKE", icon="indicators:ADX", overlay = true }

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


shift = input (1, "front.newind.offset", input.double, 0.01, 300, 0.01)
fn = input (averages.ema, "front.newind.average", input.string_selection,
averages.titles)
input_group {
"front.top line",
upper_line_visible = input { default = true, type = input.plot_visibility },
upper_line_color = input { default = "#ff0000", type = input.color },
upper_line_width = input { default = 1, type = input.line_width }
}
input_group {
"front.middle line",
middle_line_visible = input { default = true, type = input.plot_visibility },
middle_line_color = input { default = #ffffff, type = input.color },
middle_line_width = input { default = 1, type = input.line_width }
}
input_group {
"front.bottom line",
lower_line_visible = input { default = true, type = input.plot_visibility },
lower_line_color = input { default = "#00FF00", type = input.color },
lower_line_width = input { default = 1, type = input.line_width }
}
input_group {
"front.newind.adx.fill",
fill_visible = input { default = true, type = input.plot_visibility },
fill_color = input { default = rgba(138,43,226,0.20), type = input.color },
}
local averageFunction = averages [fn]
middle = averageFunction (hlc3, period)
offset = rma(tr, period) * shift
upper = middle + offset
lower = middle - offset
if fill_visible then
fill { first = upper, second = lower, color = fill_color }
end
if upper_line_visible then
plot (upper, "Upper", upper_line_color, upper_line_width)
end
if lower_line_visible then
plot (lower, "Lower", lower_line_color, lower_line_width)
end
if middle_line_visible then
plot (middle, "Middle", middle_line_color, middle_line_width)
end

instrument {
name = 'msttrading(3.1)',
short_name = 'super',

overlay = true
}

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 {
"@mikescotttrading",
colorBuy = input { default = "green", type = input.color },
visibleBuy = input { default = true, type = input.plot_visibility }
}

input_group {
"@mikescotttrading",
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),
"GO",
shape_style.triangleup,
shape_size.huge,
colorBuy,
shape_location.belowbar,
-1,
"@mikescotttrading",
"green"
)

plot_shape(
(sellCondition),
"GO",
shape_style.triangledown,
shape_size.huge,
colorSell,
shape_location.abovebar,
-1,
"@mikescotttrading",
"red"
)
instrument {
name = 'msttrading(3.1)',
short_name = 'super',

overlay = true
}

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 {
"@mikescotttrading",
colorBuy = input { default = "green", type = input.color },
visibleBuy = input { default = true, type = input.plot_visibility }
}

input_group {
"@mikescotttrading",
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),
"GO",
shape_style.triangleup,
shape_size.huge,
colorBuy,
shape_location.belowbar,
-1,
"@mikescotttrading",
"green"
)
plot_shape(
(sellCondition),
"GO",
shape_style.triangledown,
shape_size.huge,
colorSell,
shape_location.abovebar,
-1,
"@mikescotttrading",
"red"
)

instrument {name = "msttrading(3.1)", icon = "indicators:ADX", overlay = true}


bar_look = input (3, "Confirmation 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 = "orange", 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)

instrument{name="SCRIPT MIKE",icon="Trading_Lions", overlay=true}

local function 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 function 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="peachpuff",type=input.color},width=input{d
efault=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)

You might also like