Skip to content

Commit f8bd14b

Browse files
committed
Add highlighters folder
1 parent 0bd9876 commit f8bd14b

File tree

5 files changed

+124
-0
lines changed

5 files changed

+124
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
//@version=3
2+
// Copyright (c) 2019-present, Alex Orekhov (everget)
3+
// BitMEX Withdrawals Cutoff Time script may be freely distributed under the GPL-3.0 license.
4+
study("BitMEX Withdrawals Cutoff Time", overlay=true)
5+
6+
transparency = input(title="Transparency", minval=0, defval=70)
7+
8+
cutoff = hour(time) == 13
9+
transparent = color(white, 100)
10+
11+
bgcolor(cutoff ? #f57f17 : transparent, title="Cutoff Time", transp=transparency)

‎highlighters/leap_years.pine

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
//@version=3
2+
// Copyright (c) 2019-present, Alex Orekhov (everget)
3+
study("Leap Years", overlay=true)
4+
5+
transparency = input(title="Transparency", type=integer, defval=88, minval=0, maxval=100)
6+
showLabels = input(title="Show Labels ? ", type=bool, defval=true)
7+
8+
transparent = color(white, 100)
9+
labelColor = #1e90ff
10+
bgColor = #ffa726
11+
12+
isLeap = false
13+
14+
if year % 4 != 0 // year is not divisible by 4
15+
// it is a common year
16+
isLeap := false
17+
else
18+
if year % 100 != 0 // year is not divisible by 100
19+
// it is a leap year
20+
isLeap := true
21+
else
22+
if year % 400 != 0 // year is not divisible by 400
23+
// it is a common year
24+
isLeap := false
25+
else
26+
// it is a leap year
27+
isLeap := true
28+
29+
lyText = " Leap \nYear "
30+
lyStart = year != year[1] and isLeap
31+
plotshape(showLabels and lyStart, title=lyText, text=lyText, color=labelColor, textcolor=white, style=shape.labelup, location=location.belowbar, size=size.small, transp=0)
32+
bgcolor(title="Leap Year", color=isLeap ? bgColor : transparent, transp=transparency)

‎highlighters/quarters.pine

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
//@version=3
2+
// Copyright (c) 2019-present, Alex Orekhov (everget)
3+
study("Quarters", overlay=true)
4+
5+
transparency = input(title="Transparency", type=integer, defval=88, minval=0, maxval=100)
6+
showLabels = input(title="Show Labels ? ", type=bool, defval=true)
7+
8+
transparent = color(white, 100)
9+
labelColor = #1e90ff
10+
11+
m = month(time)
12+
13+
q1Text = " Q1 "
14+
q1Start = m[1] == 12 and m == 1
15+
q1 = m == 1 or m == 2 or m == 3
16+
plotshape(showLabels and q1Start, title=q1Text, text=q1Text, color=labelColor, textcolor=white, style=shape.labelup, location=location.belowbar, size=size.small, transp=0)
17+
bgcolor(title="Q1", color=q1 ? #e6194b : transparent, transp=transparency)
18+
19+
q2Text = " Q2 "
20+
q2Start = m[1] == 3 and m == 4
21+
q2 = m == 4 or m == 5 or m == 6
22+
plotshape(showLabels and q2Start, title=q2Text, text=q2Text, color=labelColor, textcolor=white, style=shape.labelup, location=location.belowbar, size=size.small, transp=0)
23+
bgcolor(title="Q2", color=q2 ? #3cb44b : transparent, transp=transparency)
24+
25+
q3Text = " Q3 "
26+
q3Start = m[1] == 6 and m == 7
27+
q3 = m == 7 or m == 8 or m == 9
28+
plotshape(showLabels and q3Start, title=q3Text, text=q3Text, color=labelColor, textcolor=white, style=shape.labelup, location=location.belowbar, size=size.small, transp=0)
29+
bgcolor(title="Q3", color=q3 ? #ffe119 : transparent, transp=transparency)
30+
31+
q4Text = " Q4 "
32+
q4Start = m[1] == 9 and m == 10
33+
q4 = m == 10 or m == 11 or m == 12
34+
plotshape(showLabels and q4Start, title=q4Text, text=q4Text, color=labelColor, textcolor=white, style=shape.labelup, location=location.belowbar, size=size.small, transp=0)
35+
bgcolor(title="Q4", color=q4 ? #f58231 : transparent, transp=transparency)

‎highlighters/range_candles.pine

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//@version=4
2+
// Copyright (c) 2020-present, Alex Orekhov (everget)
3+
// Range Candles script may be freely distributed under the terms of the GPL-3.0 license.
4+
study("Range Candles", overlay=true)
5+
6+
var color bullColor = input(title="Bull Color", defval=#26a69a)
7+
var color bearColor = input(title="Bear Color", defval=#ef5350)
8+
candleColor = close >= open ? bullColor : bearColor
9+
10+
plotcandle(
11+
open,
12+
high,
13+
low,
14+
close,
15+
title="",
16+
color=candleColor,
17+
bordercolor=candleColor,
18+
wickcolor=candleColor
19+
)

‎highlighters/weekdays_gaps.pine

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//@version=4
2+
// Copyright (c) 2019-present, Alex Orekhov (everget)
3+
// Weekdays Gaps script may be freely distributed under the terms of the GPL-3.0 license.
4+
study("Weekdays Gaps", overlay=true)
5+
6+
td = dayofweek(time)
7+
yd = dayofweek(time[1])
8+
9+
mo = dayofweek.monday
10+
tu = dayofweek.tuesday
11+
we = dayofweek.wednesday
12+
th = dayofweek.thursday
13+
fr = dayofweek.friday
14+
sa = dayofweek.saturday
15+
su = dayofweek.sunday
16+
17+
gaps = td == mo and yd != su or
18+
td == tu and yd != mo or
19+
td == we and yd != tu or
20+
td == th and yd != we or
21+
td == fr and yd != th or
22+
td == sa and yd != fr or
23+
td == su and yd != sa
24+
25+
gapColor = color.new(#ffcc80, 70)
26+
noneColor = color.new(color.white, 100)
27+
bgcolor(gaps ? gapColor : noneColor, title="Gap")

0 commit comments

Comments
 (0)