-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathMultiWilly_Dude.txt
More file actions
35 lines (27 loc) · 1.19 KB
/
MultiWilly_Dude.txt
File metadata and controls
35 lines (27 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//Customized willy w/ background change
//Donate to TheDude's dude fund: 18yWuPhLr34AzunDUfYpy5XfrDeXoSFhR7
study(title="MultiWilly_Dude", shorttitle="multiWilly_Dude")
length = input(21, minval=1)
upper = highest(length)
lower = lowest(length)
out = 100 * (close - upper) / (upper - lower)
src = out, len = input(13, minval=1, title="Length")
out2 = ema(out, len)
outavg = (out+out2)/2
outbtce = security("BTCE:BTCUSD",period, out)
outbtce2 = ema(outbtce, len)
outbtceavg = (outbtce+outbtce2)/2
outavgtot = (outbtceavg+outavg)/2
bolline = input(type=bool, defval=false, title="Color changing line")
bolbackg = input(type=bool, defval=true, title="Color changing Background")
e2 = outavg <= -75 ? green : outbtceavg <=-75 ? yellow : outavg <= -25 ? na :outavg <=0 ? red : outbtceavg <= 0 ? yellow : blue
bgcolor(bolbackg ? e2 : na, transp=50)
//plot(bolbackg, title="MFIvsRSI", style=line, linewidth=2, color=e2)
//plot(mfiVSrsi2, title="MFIvsRSI", style=line, linewidth=1, color=e2)
plot(out, color = white)
plot(outbtce, color = gray, style=line, transp = 70)
plot(out2, title="EMA", color=orange)
plot(outbtce2, color=blue, transp = 70)
band1 = hline(-25)
band0 = hline(-75)
fill(band1, band0)