mejialucas

Supertrend V1.0 - Buy or Sell Signal

27800 views
13746
//Author - Rajandran R
//www.marketcalls.in
study("Supertrend V1.0 - Buy or Sell Signal", overlay = true)

Factor=input(3, minval=1,maxval = 100)
Pd=input(7, minval=1,maxval = 100)


Up=hl2-(Factor*atr( Pd ))
Dn=hl2+(Factor*atr( Pd ))


TrendUp=close>TrendUp? max(Up,TrendUp) : Up
TrendDown=close<TrendDown? min(Dn,TrendDown) : Dn

Trend = close > TrendDown ? 1: close< TrendUp? -1: nz (Trend,1)
Tsl = Trend==1? TrendUp: TrendDown

linecolor = Trend == 1 ? green : red

plot( Tsl , color = linecolor , style = line , linewidth = 2,title = "SuperTrend")

plotshape(cross(close, Tsl ) and close>Tsl , "Up Arrow", shape.triangleup,location.belowbar,green,0,0)
plotshape(cross( Tsl ,close) and close<Tsl , "Down Arrow", shape.triangledown , location.abovebar, red,0,0)
//plot(Trend==1 and Trend==-1,color = linecolor, style = circles, linewidth = 3,title="Trend")

plotarrow(Trend == 1 and Trend == -1 ? Trend : na, title="Up Entry Arrow", colorup=lime, maxheight=60, minheight=50, transp=0)
plotarrow(Trend == -1 and Trend == 1 ? Trend : na, title="Down Entry Arrow", colordown=red, maxheight=60, minheight=50, transp=0)

Remove from Favorite Scripts Add to Favorite Scripts

Comments

Hello,

This is a great indicator, thanks for sharing this. but when I set up the alarm, Trading view asks for different conditions, after "up arrow", there's a whole bunch of crossing-crossing down-crossing up..., I have to choose one, which one could it be ?
+34 Reply
jordanovitch jordanovitch
@jordanovitch, i found the way to do it
+21 Reply
linchong6562 jordanovitch
@jordanovitch, can you share me how to set up the alarm,ths.
+24 Reply
dipenambalia linchong6562
@linchong6562, hi. were you able to figure out the alert settings?
+2 Reply
tartrade2018 jordanovitch
@jordanovitch, could you share how you did it ?
Reply
wutangforever jordanovitch
@jordanovitch, Can you explain how?
Reply
Thank you for providing such an excellent indicator. I really appreciate you sharing.
+11 Reply
thank you very much bro
+7 Reply
Thank you for sharing this. Can you please explain if it is possible to create an alert on "Up Entry Arrow"?
+6 Reply
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Refer a friend My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out