Support and resistance indicator script

Support and resistance indicator script

 

Open pine editor and paste below script and click on add to chart.

 

//@version=4
study(“Support and resistance by Koli”, overlay=true)

closebarcrnt = close
lowbarprevious = low[1]

highbarprevious = high[1]

redtwocandle = closebarcrnt <= lowbarprevious
greentwocandle = closebarcrnt >= highbarprevious

vol1 = volume[1]
vol0 = volume

highvol = vol0 > vol1

redtwocandlewithvolume = redtwocandle and highvol
greentwocandlewithvolume = greentwocandle and highvol

plotshape(redtwocandlewithvolume, style=shape.triangledown, location=location.abovebar, color=color.red, size=size.tiny)

plotshape(greentwocandlewithvolume, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.tiny)

4 Comments

  1. line 8: no viable alternative at character ‘“’

    this error is showing in pine editor

  2. Line 2 code will be –
    study(“Support and resistance by Koli”, overlay=true)

Leave a Comment

Your email address will not be published. Required fields are marked *