【发布时间】:2019-08-29 19:12:57
【问题描述】:
我想知道是否有一些友好的灵魂可以帮助我形成这个指标:ATR2 daily/2 + Daily Low。我没有制作它的技能,但我有一些“应该”工作的代码。
//
=3 study(“Fiddy”, overlay=true)
t = time(“1440”, session.extended) // 1440=60*24 is the number of minutes in a whole day. You may use “0930-1600” as second session parameter
//plot(t, style=linebr) // debug is_first = na(t[1]) and not na(t) or t[1] < t
//plotshape(is_first, color=red, style=shape.arrowdown)
day_high = na day_low = na
if is_first and barstate.isnew
day_high := high
day_low := low
else day_high := day_high[1]
day_low := day_low[1]
fiddy (ATR2 daily /2)= (max(day_high, close[1]) + min(day_low, close[1]))/2
fiddy2 = (max(day_high, close[1]) – min(day_low, close[1]))*0.618 + day_low
fiddy3 = (max(day_high, close[1]) – min(day_low, close[1]))*0.382 + day_low
if high > day_high day_high := high
if low < day_low day_low := low
plot(fiddy, color=red, title=”fiddy”)
plot(fiddy2, color=orange, title=”fiddy618″)
plot(fiddy3, color=orange, title=”fiddy382″)
plot(day_high, color=lime, title=”day_high”)
plot(day_low, color=lime, title= ‘day_low’)
【问题讨论】:
标签: pine-script