Bitcoin / US Dollar Perpetual Inverse Swap Contract
1日
BITMEX
始値
8377.5
高値
8420.5
安値
8250.5
終値
8261.5
8261.5
∅
−116.0 (−1.38%)
出来高
530.821M
0.0 (0.00%)
1
HA Sequential
8275.5
8420.5
8250.5
8327.5
0.0
0.0
0.0
0.0
1.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
10442.0
∅
6244.5
2019 10月 3
Similar to TD indicator just on HA candels
2019 10月 3
リリースノート:
add Tom Demark full indicator based on HA
2019 10月 3
リリースノート:
minor change
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。
免責事項
これらの情報および投稿は、TradingViewが提供または保証する金融、投資、取引、またはその他の種類のアドバイスや推奨を意図したものではなく、またそのようなものでもありません。詳しくは利用規約をご覧ください。
チャートでこのスクリプトを利用したいですか?
Pineスクリプト™ インジケーターHA Sequential
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
//@version=4
study("HA Sequential",overlay=true)
//Heiken Ashi
o = security(heikinashi(syminfo.tickerid),timeframe.period,open)
c = security(heikinashi(syminfo.tickerid),timeframe.period, close)
l = security(heikinashi(syminfo.tickerid),timeframe.period, low)
h = security(heikinashi(syminfo.tickerid),timeframe.period, high)
plotcandle(o, h, l, c, color=o < c ? color.lime : color.red)
TD = 0
TS = 0
TD := c > c[4] ? nz(TD[1]) + 1 : 0
TS := c < c[4] ? nz(TS[1]) + 1 : 0
haUp = TD - valuewhen(TD < TD[1], TD , 1 )
haDn = TS - valuewhen(TS < TS[1], TS , 1 )
f_draw_infopanel(_x, _y, _line, _text, _color)=>
_rep_text = ""
for _l = 0 to _line
_rep_text := _rep_text + "\n"
_rep_text := _rep_text + _text
var label _la = na
label.delete(_la)
_la := label.new(
x=_x, y=_y,
text=_rep_text, xloc=xloc.bar_time, yloc=yloc.price,
color=color.yellow, style=label.style_labelup, textcolor=_color, size=size.large)
posx = timenow + round(change(time)*15)
posy = highest(20)
f_draw_infopanel(posx, posy, 0, "HA "+tostring(haUp > 0 ? haUp : haDn, "#"), haUp > 0 ? color.lime : color.red)
//
x=crossover(haUp , 0)
z=crossover( haDn,0)
plotshape(x, "up arrow", shape.triangleup, location.belowbar, color.green,size=size.tiny)
plotshape(z , "down arrow", shape.triangledown, location.abovebar, color.red,size=size.tiny)
//based on https://www.tradingview.com/v/XZpTtrNm/
showSetup = input(true, "Show setup")
showCountdown = input(true, "Show countdown")
showOnlyCompletion = input(true, "Only show completions")
showTDST = input(true, "Show Support/Resistance")
showRisk = input(true, "Show risk line/Stop Loss")
shortColour = color.green
longColour = color.red
estados = 0
estadol = 0
estadosmoothed = 0
setupShort = int(na)
setupLong = int(na)
setupCount = int(na)
setupColour = color(na)
perfectSetup = bool(na)
setupShort := if c < c[4]
0
else
if true
if nz(setupShort[1]) == 0 and c[1] < c[5] and c > c[4]
1
else
if nz(setupShort[1]) == 0
0
else
nz(setupShort[1] + 1)
setupLong := if c > c[4]
0
else
if true
if nz(setupLong[1]) == 0 and c[1] > c[5] and c < c[4]
1
else
if nz(setupLong[1]) == 0
0
else
nz(setupLong[1] + 1)
setupCount := max(setupShort, setupLong)
setupColour := setupShort > 0 ? setupLong > 0 ? color.black : shortColour : longColour
estados := setupShort > 0 ? setupLong > 0 ? 0 : 1 : 0
estadol := setupShort > 0 ? setupLong > 0 ? 0 : 0 : 1
estadosmoothed := setupShort > 0 ? setupLong > 0 ? 1 : 0 : 0
perfectSetup := true and (setupShort == 8 and h >= h[1] and h >= h[2] or
setupShort == 9 and h >= h[2] and h >= h[3] or
setupLong == 8 and l <= l[1] and l <= l[2] or
setupLong == 9 and l <= low[2] and l <= l[3])
plotchar(showSetup and (not showOnlyCompletion or barstate.islast) and setupCount == 1, title="Setup 1", char='', text='1', textcolor=setupColour, transp=0)
plotchar(showSetup and (not showOnlyCompletion or barstate.islast) and setupCount == 2, title="Setup 2", char='', text='2', textcolor=setupColour, transp=0)
plotchar(showSetup and (not showOnlyCompletion or barstate.islast) and setupCount == 3, title="Setup 3", char='', text='3', textcolor=setupColour, transp=0)
plotchar(showSetup and (not showOnlyCompletion or barstate.islast) and setupCount == 4, title="Setup 4", char='', text='4', textcolor=setupColour, transp=0)
plotchar(showSetup and (not showOnlyCompletion or barstate.islast) and setupCount == 5, title="Setup 5", char='', text='5', textcolor=setupColour, transp=0)
plotchar(showSetup and (not showOnlyCompletion or barstate.islast) and setupCount == 6, title="Setup 6", char='', text='6', textcolor=setupColour, transp=0)
plotchar(showSetup and (not showOnlyCompletion or barstate.islast) and setupCount == 7, title="Setup 7", char='', text='7', textcolor=setupColour, transp=0)
plotchar(showSetup and (not showOnlyCompletion or barstate.islast) and setupCount == 8, title="Setup 8", char='', text='8', textcolor=setupColour, transp=0)
plotchar(not perfectSetup and showSetup and setupCount == 9, title="Setup 9", char='', text='9', textcolor=setupColour, transp=0)
plotchar(perfectSetup and showSetup and setupCount == 9, title="Perfect setup 9", char='', text='9P', textcolor=setupColour, transp=0)
cdownShort = int(na)
cdownLong = int(na)
cdownColour = color(na)
cdownCount = int(na)
perfect8 = float(na)
perfectCountdown = bool(na)
lastCompletedSetup = int(na)
setupHigh = float(na)
setupLow = float(na)
cancelCountdown = bool(na)
recycleCountdown = bool(na)
LONG = -1
SHORT = 1
CANCELLED = 0
recycleCountdown := if setupShort == 9 and lastCompletedSetup[1] == SHORT or setupLong == 9 and lastCompletedSetup[1] == LONG
highest(9) - lowest(9) >= setupHigh[1] - setupLow[1] and
(setupHigh[1] - setupLow[1]) * 1.618 > highest(9) - lowest(9)
highest_1 = highest(9)
setupHigh := recycleCountdown or setupShort == 9 and lastCompletedSetup[1] != SHORT or
setupLong == 9 and lastCompletedSetup[1] != LONG ? highest_1 : setupHigh[1]
lowest_1 = lowest(9)
setupLow := recycleCountdown or setupShort == 9 and lastCompletedSetup[1] != SHORT or
setupLong == 9 and lastCompletedSetup[1] != LONG ? lowest_1 : setupLow[1]
cancelCountdown := lastCompletedSetup[1] == SHORT and high < setupLow or
lastCompletedSetup[1] == LONG and low > setupHigh or recycleCountdown
lastCompletedSetup := setupLong == 9 ? LONG :
setupShort == 9 ? SHORT : cdownShort[1] == 13 and setupShort[1] != 9 or
cdownLong[1] == 13 and setupLong[1] != 9 or cancelCountdown ? CANCELLED :
lastCompletedSetup[1]
cdownShort := lastCompletedSetup != SHORT or cancelCountdown ? 0 :
c >= l[2] ? nz(cdownShort[1]) % 13 + 1 : nz(cdownShort[1]) % 13
cdownLong := lastCompletedSetup != LONG or cancelCountdown ? 0 :
c <= l[2] ? nz(cdownLong[1]) % 13 + 1 : nz(cdownLong[1]) % 13
cdownCount := max(cdownShort, cdownLong)
cdownColour := cdownShort > 0 ? shortColour : longColour
perfect8 := cdownCount < 8 ? na : cdownCount == 8 ? c : perfect8[1]
perfectCountdown := true and
(cdownShort == 13 and h >= perfect8 or cdownLong and l <= perfect8)
plotchar(showCountdown and (not showOnlyCompletion or barstate.islast) and cdownCount == 1 and cdownCount[1] != 1, title="Countdown 1", char='', text='1', location=location.belowbar, textcolor=cdownColour, transp=0)
plotchar(showCountdown and (not showOnlyCompletion or barstate.islast) and cdownCount == 2 and cdownCount[1] == 1, title="Countdown 2", char='', text='2', location=location.belowbar, textcolor=cdownColour, transp=0)
plotchar(showCountdown and (not showOnlyCompletion or barstate.islast) and cdownCount == 3 and cdownCount[1] == 2, title="Countdown 3", char='', text='3', location=location.belowbar, textcolor=cdownColour, transp=0)
plotchar(showCountdown and (not showOnlyCompletion or barstate.islast) and cdownCount == 4 and cdownCount[1] == 3, title="Countdown 4", char='', text='4', location=location.belowbar, textcolor=cdownColour, transp=0)
plotchar(showCountdown and (not showOnlyCompletion or barstate.islast) and cdownCount == 5 and cdownCount[1] == 4, title="Countdown 5", char='', text='5', location=location.belowbar, textcolor=cdownColour, transp=0)
plotchar(showCountdown and (not showOnlyCompletion or barstate.islast) and cdownCount == 6 and cdownCount[1] == 5, title="Countdown 6", char='', text='6', location=location.belowbar, textcolor=cdownColour, transp=0)
plotchar(showCountdown and (not showOnlyCompletion or barstate.islast) and cdownCount == 7 and cdownCount[1] == 6, title="Countdown 7", char='', text='7', location=location.belowbar, textcolor=cdownColour, transp=0)
plotchar(showCountdown and (not showOnlyCompletion or barstate.islast) and cdownCount == 8 and cdownCount[1] == 7, title="Countdown 8", char='', text='8', location=location.belowbar, textcolor=cdownColour, transp=0)
plotchar(showCountdown and (not showOnlyCompletion or barstate.islast) and cdownCount == 9 and cdownCount[1] == 8, title="Countdown 9", char='', text='9', location=location.belowbar, textcolor=cdownColour, transp=0)
plotchar(showCountdown and (not showOnlyCompletion or barstate.islast) and cdownCount == 10 and cdownCount[1] == 9, title="Countdown 10", char='', text='10', location=location.belowbar, textcolor=cdownColour, transp=0)
plotchar(showCountdown and (not showOnlyCompletion or barstate.islast) and cdownCount == 11 and cdownCount[1] == 10, title="Countdown 11", char='', text='11', location=location.belowbar, textcolor=cdownColour, transp=0)
plotchar(showCountdown and (not showOnlyCompletion or barstate.islast) and cdownCount == 12 and cdownCount[1] == 11, title="Countdown 12", char='', text='12', location=location.belowbar, textcolor=cdownColour, transp=0)
plotchar(not perfectCountdown and showCountdown and cdownCount == 13 and cdownCount[1] == 12, title="Countdown 13", char='', text='13', location=location.belowbar, textcolor=cdownColour, transp=0)
plotchar(perfectCountdown and showCountdown and cdownCount == 13 and cdownCount[1] == 12, title="Perfect Countdown 13", char='', text='13P', location=location.belowbar, textcolor=cdownColour, transp=0)
plotshape(showCountdown and cancelCountdown, title="Countdown broke setup support/resistance", location=location.belowbar, style=shape.xcross, color=cdownColour, transp=0)
tdstSupport = float(na)
tdstResistance = float(na)
tdRisk = float(na)
riskbar = int(na)
highest_2 = highest(9)
tdstResistance := not showTDST ? na :
setupLong == 9 ? highest_2 : c > tdstResistance[1] ? na : tdstResistance[1]
lowest_2 = lowest(9)
tdstSupport := not showTDST ? na :
setupShort == 9 ? lowest_2 : c < tdstSupport[1] ? na : tdstSupport[1]
//
plot(tdstResistance, title="TDST Resistance", color=longColour, style=plot.style_cross, transp=0)
plot(tdstSupport, title="TDST Support", color=shortColour, style=plot.style_cross, transp=0)
if not showRisk
tdRisk := na
tdRisk
else
if setupLong == 9
riskbar := -1 * lowestbars(9)[0]
tdRisk := l[riskbar] - tr[riskbar]
tdRisk
else
if setupShort == 9
riskbar = -1 * highestbars(9)[0]
tdRisk := h[riskbar] + tr[riskbar]
tdRisk
else
tdRisk := min(o, c) < tdRisk[1] and max(o, c) > tdRisk[1] ? na : tdRisk[1]
tdRisk
plot(tdRisk, title="TD Risk", color=color.black, style=plot.style_cross, linewidth=1, transp=0)
コメント