mallu-trader

Mt pivot zones

//@version=4
study("MT Pivot Zones", shorttitle="MT Pivot Zones", overlay=true)
TimeFrame = input("D",title="Timeframe",type=input.resolution)
Close = security(syminfo.tickerid, TimeFrame, close, lookahead=true)
Open = security(syminfo.tickerid, TimeFrame, open, lookahead=true)
High = security(syminfo.tickerid, TimeFrame, high, lookahead=true)
Low = security(syminfo.tickerid, TimeFrame, low, lookahead=true)

//CALCULATIONS
Pivot = (High + Low + Close) / 3
BC = (High + Low)/2
TC = ( Pivot - BC ) + Pivot
R1 = ( Pivot * 1.999) - Low
R1a = ( Pivot * 2.001) - Low
R2 = Pivot + (High -Low)*.9
R2a = Pivot + (High - Low)*1.1
R3 = High + (1.9*( Pivot - Low))
R3a = High + (2.1*( Pivot - Low))
S1 = ( Pivot * 1.999) - High
S1a = ( Pivot * 2.001) - High
S2 = Pivot - (High - Low)*1.1
S2a = Pivot - (High - Low)*.9
S3 = Low - (2.1*(High - Pivot ))
S3a = Low - (1.9*(High - Pivot ))

//PLOTS
plot( Pivot ,color = color.purple, title = "Pivot", style=plot.style_circles)
BC1 = plot( BC ,color = color.purple, title = "BC", style=plot.style_circles)
TC1 = plot( TC ,color = color.purple, title = "TC", style=plot.style_circles)
RZ1 = plot(R1,color = color.blue, title = "R1", style=plot.style_circles)
RZ1a = plot(R1a,color = color.blue, title = "R1", style=plot.style_circles)
RZ2 = plot(R2,color = color.blue, title = "R2", style=plot.style_circles)
RZ2a = plot(R2a,color = color.blue, title = "R2", style=plot.style_circles)
RZ3 = plot(R3,color = color.blue, title = "R3", style=plot.style_circles)
RZ3a = plot(R3a,color = color.blue, title = "R3", style=plot.style_circles)
SZ1 = plot(S1,color = color.orange, title = "S1", style=plot.style_circles)
SZ1a = plot(S1a,color = color.orange, title = "S1", style=plot.style_circles)
SZ2 = plot(S2,color = color.orange, title = "S2", style=plot.style_circles)
SZ2a = plot(S2a,color = color.orange, title = "S2", style=plot.style_circles)
SZ3 = plot(S3,color = color.orange, title = "S3", style=plot.style_circles)
SZ3a = plot(S3a,color = color.orange, title = "S3", style=plot.style_circles)

//FILLS
fill(BC1, TC1, color=color.blue, title=" 1 Fill", transp=90)
fill(RZ1, RZ1a, color=color.blue, title="R1 Fill", transp=90)
fill(RZ2, RZ2a, color=color.blue, title="R2 Fill", transp=90)
fill(RZ3, RZ3a, color=color.blue, title="R3 Fill", transp=90)
fill(SZ1, SZ1a, color=color.orange, title="S1 Fill", transp=90)
fill(SZ2, SZ2a, color=color.orange, title="S2 Fill", transp=90)
fill(SZ3, SZ3a, color=color.orange, title="S3 Fill", transp=90)



Protected script
This script is published closed-source and you may use it freely. You can favorite it to use it on a chart. You cannot view or modify its source code.
Want to use this script on a chart?