Attachments forums

List of attachments posted on this forum.


All files on forums: 135731

HSRL - Historical Support Resistance Lines

ionone, Wed May 18, 2022 6:36 pm

converted from TradingView : HSRL - Historical Support Resistance Lines

might be usefull to ya

Code: Select all

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © spiritualhealer117

//@version=4
study("HSRL")
length = input(title="Length", type=input.integer, defval=150)
resistanceChange = (highest(close,length)-highest(close,length)[length])/highest(close,length)[length]
supportChange = (lowest(close,length)-lowest(close,length)[length])/lowest(close,length)[length]
HSRL = resistanceChange-supportChange

line1=plot(resistanceChange,color=color.green)
line2=plot(supportChange,color=color.red)
fill(line1,line2,color=resistanceChange>supportChange?(resistanceChange>0?color.new(color.green,50):color.new(color.red,50)):(resistanceChange>0?color.new(color.yellow,25):color.new(color.yellow,50)))



All files in topic