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

CODES

The document contains Pine Script code that generates multiple support and resistance lines on a chart based on a sensitivity input. It multiplies the sensitivity by values from 1 to 500 to create over 100 horizontal plot lines for resistance and support. It also includes a separate study for a Supertrend indicator that plots trend lines and signals for buy and sell conditions.

Uploaded by

bidow cabanglan
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)
348 views5 pages

CODES

The document contains Pine Script code that generates multiple support and resistance lines on a chart based on a sensitivity input. It multiplies the sensitivity by values from 1 to 500 to create over 100 horizontal plot lines for resistance and support. It also includes a separate study for a Supertrend indicator that plots trend lines and signals for buy and sell conditions.

Uploaded by

bidow cabanglan
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/ 5

AUTO SUPP.

study("Auto-Support v 0.3", overlay=true)

a = input(title="Sensitivity", type=integer, defval=10, minval=1, maxval=10)

d = input(title="Transparency", type=integer, defval=85, minval=1, maxval=100)

b = #FF0000

c = #0000FF

plot(highest(a*1), title='Resistance 1', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(lowest (a*1), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(highest(a*2), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(lowest (a*2), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(highest(a*3), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(lowest (a*3), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(highest(a*4), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(lowest (a*4), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(highest(a*5), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(lowest (a*5), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(highest(a*6), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(lowest (a*6), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(highest(a*7), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(lowest (a*7), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)
plot(highest(a*8), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,
trackprice=true)

plot(lowest (a*8), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(highest(a*9), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(lowest (a*9), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(highest(a*10), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(lowest (a*10), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(highest(a*15), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(lowest (a*15), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(highest(a*20), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(lowest (a*20), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(highest(a*25), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(lowest (a*25), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(highest(a*30), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(lowest (a*30), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(highest(a*35), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(lowest (a*35), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(highest(a*40), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(lowest (a*40), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(highest(a*45), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)
plot(lowest (a*45), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,
trackprice=true)

plot(highest(a*50), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(lowest (a*50), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(highest(a*75), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(lowest (a*75), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(highest(a*100), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(lowest (a*100), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(highest(a*150), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(lowest (a*150), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(highest(a*200), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(lowest (a*200), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(highest(a*250), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(lowest (a*250), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(highest(a*300), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(lowest (a*300), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(highest(a*350), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(lowest (a*350), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(highest(a*400), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(lowest (a*400), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)
plot(highest(a*450), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,
trackprice=true)

plot(lowest (a*450), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(highest(a*500), title='Resistance', color=b, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

plot(lowest (a*500), title='Support', color=c, linewidth=2, style=line, transp=d, offset=-9999,


trackprice=true)

BUY-SELL

study("Supertrend", overlay = true)

Periods = input(title="ATR Period", type=input.integer, defval=10)

src = input(hl2, title="Source")

Multiplier = input(title="ATR Multiplier", type=input.float, step=0.1, defval=3.0)

changeATR= input(title="Change ATR Calculation Method ?", type=input.bool, defval=true)

showsignals = input(title="Show Buy/Sell Signals ?", type=input.bool, defval=true)

highlighting = input(title="Highlighter On/Off ?", type=input.bool, defval=true)

atr2 = sma(tr, Periods)

atr= changeATR ? atr(Periods) : atr2

up=src-(Multiplier*atr)

up1 = nz(up[1],up)

up := close[1] > up1 ? max(up,up1) : up

dn=src+(Multiplier*atr)

dn1 = nz(dn[1], dn)

dn := close[1] < dn1 ? min(dn, dn1) : dn

trend = 1

trend := nz(trend[1], trend)

trend := trend == -1 and close > dn1 ? 1 : trend == 1 and close < up1 ? -1 : trend

upPlot = plot(trend == 1 ? up : na, title="Up Trend", style=plot.style_linebr, linewidth=2,


color=color.green)

buySignal = trend == 1 and trend[1] == -1


plotshape(buySignal ? up : na, title="UpTrend Begins", location=location.absolute, style=shape.circle,
size=size.tiny, color=color.green, transp=0)

plotshape(buySignal and showsignals ? up : na, title="Buy", text="Buy", location=location.absolute,


style=shape.labelup, size=size.tiny, color=color.green, textcolor=color.white, transp=0)

dnPlot = plot(trend == 1 ? na : dn, title="Down Trend", style=plot.style_linebr, linewidth=2,


color=color.red)

sellSignal = trend == -1 and trend[1] == 1

plotshape(sellSignal ? dn : na, title="DownTrend Begins", location=location.absolute,


style=shape.circle, size=size.tiny, color=color.red, transp=0)

plotshape(sellSignal and showsignals ? dn : na, title="Sell", text="Sell", location=location.absolute,


style=shape.labeldown, size=size.tiny, color=color.red, textcolor=color.white, transp=0)

mPlot = plot(ohlc4, title="", style=plot.style_circles, linewidth=0)

longFillColor = highlighting ? (trend == 1 ? color.green : color.white) : color.white

shortFillColor = highlighting ? (trend == -1 ? color.red : color.white) : color.white

fill(mPlot, upPlot, title="UpTrend Highligter", color=longFillColor)

fill(mPlot, dnPlot, title="DownTrend Highligter", color=shortFillColor)

alertcondition(buySignal, title="SuperTrend Buy", message="SuperTrend Buy!")

alertcondition(sellSignal, title="SuperTrend Sell", message="SuperTrend Sell!")

changeCond = trend != trend[1]

alertcondition(changeCond, title="SuperTrend Direction Change", message="SuperTrend has


changed direction!")

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy