PolarSolar

Donchian Fibo Channels v2

Updated and fixed version of DFC .
- fixed bugs
- added permanent setting for direction
- added color change for terminal and breakout bars
- added smart timings for line of 100% retracement
從喜愛的腳本中移除 添加到喜愛的腳本
// Created by PolarSolar 09 May 2016
// Updated: 09 May 2016

study(title="Donchian Fibo Channels v2", shorttitle="DFC2", overlay=true)
length = input(21, minval=8)
prz = input(0.618, title="PRZ level",minval=0.236, maxval=0.886, step=0.001)
dir = input(true, title="Uptrend?")
lo = lowest(round(dir?length*(1/prz):length))
hi = highest(round(dir?length:length*(1/prz)))
range = abs(hi-lo)
// calculate levels
r236 = dir>0?hi-(range*0.236):lo+(range*0.236)
r382 = dir>0?hi-(range*0.382):lo+(range*0.382)
r500 = avg(hi,lo)// basis
r618 = dir>0?hi-(range*0.618):lo+(range*0.618)
r707 = dir>0?hi-(range*0.707):lo+(range*0.707)
r786 = dir>0?hi-(range*0.786):lo+(range*0.786)
r886 = dir>0?hi-(range*0.886):lo+(range*0.886)
przl = dir>0?hi-(range*prz):lo+(range*prz)

plot(lo,    color=gray,     title="MIN", linewidth=2)
plot(hi,    color=gray,     title="MAX", linewidth=2)
plot(przl,  color=#EEE8AA,  title="PRZ", linewidth=2, trackprice=true) // special
plot(r236,  color=#BA55D3,  title=".236") // violet
plot(r382,  color=#4169E1,  title=".382") // blue
plot(r500,  color=#00BFFF,  title=".500") // light blue
plot(r618,  color=#32CD32,  title=".618") // green
plot(r707,  color=#FFD700,  title=".707") // yellow
plot(r786,  color=#FF8C00,  title=".786") // orange
plot(r886,  color=red,      title=".886") // red
// rebound
barcolor(dir==true  and  low[1]<przl[1] and close[1]>przl[1] and close[2]>przl[2] and close[3]>przl[3]?#7FFF00:na,offset=-1) // go up from PRZ
barcolor(dir==false and high[1]>przl[1] and close[1]<przl[1] and close[2]<przl[2] and close[3]<przl[3]?#FF1493:na,offset=-1)  // go dn from PRZ
// break
barcolor(dir>0 and close[1]<przl[1]?#DC143C:na,offset=-1) // PRZ breaked down
barcolor(dir==0 and close[1]>przl[1]?#32CD32:na,offset=-1)  // PRZ breaked up
can you tell me how to use it
thx
回覆
PolarSolar ConcordDeath
@ConcordDeath, you can find this script by name and add to chart
回覆
Wicked piece of coding!! Nice!! Great indicator. Learnt much from you. Thanks. :))
+1 回覆
首頁 股票篩選器 外匯篩選器 加密貨幣篩選器 全球財經日曆 節目 如何運作 圖表功能 價格 網站規則 版主 網站 & 經紀商解決方案 小工具 圖表解決方案 輕量圖表庫 幫助中心 推薦朋友 功能請求 部落格 & 新聞 推特
概述 個人資料設定 賬戶和賬單 推薦朋友 我的客服工單 幫助中心 發表的想法 粉絲 正在關注 私人訊息 在線聊天 登出