From 5292f7103afda9d822029ab3a9d95905db3e085d Mon Sep 17 00:00:00 2001 From: RandyMcMillan Date: Mon, 2 Sep 2019 23:05:29 -0400 Subject: [PATCH] add more examples Changes to be committed: new file: persistent_SR_lines.txt --- pinescript/v3/persistent_SR_lines.txt | 50 +++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 pinescript/v3/persistent_SR_lines.txt diff --git a/pinescript/v3/persistent_SR_lines.txt b/pinescript/v3/persistent_SR_lines.txt new file mode 100644 index 0000000..b1bda08 --- /dev/null +++ b/pinescript/v3/persistent_SR_lines.txt @@ -0,0 +1,50 @@ +//@version=3 +study("SOLARIZED PERSISTENT S/R LINES",precision=2) +theme = 0 //true 0 false +transparency = 0 +Base03 = iff(theme == 0, color(#002b36, transparency),color(#fdf6e3, transparency)) +Base02 = iff(theme == 0, color(#003743, transparency), color(#eee8d5, transparency)) +Base01 = color(#586e75, transparency),Base00 = color(#657b83, transparency),Base0 = color(#839496, transparency),Base1 = color(#93a1a1, transparency) +Base2 = iff(theme == 0, color(#eee8d5, transparency), color(#003743, transparency)) +Base3 = iff(theme == 0, color(#fdf6e3, transparency), color(#002b36, transparency)) +yellow = color(#b58900,transparency) ,orange = color(#cb4b16,transparency),red = color(#dc322f,transparency),magenta = color(#d33682,transparency) +violet = color(#6c71c4,transparency),blue = color(#268bd2,transparency),cyan = color(#2aa198,transparency),green = color(#859900,transparency) +//We overload standard colors here +aqua=cyan,black=Base03,fuchsia=magenta,gray=Base1,lime=green,maroon=magenta,navy=blue,olive=green,purple=violet,silver=Base1,teal=cyan,white=Base3 +//End Color Palette Creation +//plot(open) +input = 10 +newLow = low == lowest(low, input) +plot(lowest(low, 1),title="1low",color=green) +plot(lowest(low, 2),title="2low",color=green) +plot(lowest(low, 3),title="3low",color=green) +plot(lowest(low, 5),title="5low",color=green) +plot(lowest(low, 8),title="8low",color=green) +plot(lowest(low, 13),title="13low",color=green) +plot(lowest(low, 21),title="21low",color=green) +plot(lowest(low, 34),title="34low",color=green) +plot(lowest(low, 55),title="55low",color=green) +plot(lowest(low, 89),title="89low",color=green) +plot(lowest(low, 144),title="144low",color=green) +plot(lowest(low, 233),title="233low",color=green) +plot(lowest(low, 377),title="377low",color=green) +plot(lowest(low, 610),title="610low",color=green) +plot(lowest(low, 987),title="987low",color=green) + +newHigh = high == highest(low, input) +plot(highest(low, 1),title="1high",color=red) +plot(highest(low, 2),title="2high",color=red) +plot(highest(low, 3),title="3high",color=red) +plot(highest(low, 5),title="5high",color=red) +plot(highest(low, 8),title="8high",color=red) +plot(highest(low, 13),title="13high",color=red) +plot(highest(low, 21),title="21high",color=red) +plot(highest(low, 34),title="34high",color=red) +plot(highest(low, 55),title="55high",color=red) +plot(highest(low, 89),title="89high",color=red) +plot(highest(low, 144),title="144high",color=red) +plot(highest(low, 233),title="233high",color=red) +plot(highest(low, 377),title="377high",color=red) +plot(highest(low, 610),title="610high",color=red) +plot(highest(low, 987),title="987high",color=red) +plot(close,title="close",color=white)