munkeefonix

Ichimoku Cloud Time

Ichimoku Cloud that will remain fixed to a time interval. Might be useful to someone wanting to use multiple Ichimoku Clouds on a single time frame.

Input values:
Daily Interval: If checked then days are used for the interval. If unchecked then minutes will be used.
Interval: The interval to use for the indicator.
开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?
//  Ichimoku Cloud that will remain fixed to a time interval. 
//
//  @author munkeefonix
//  https://www.tradingview.com/u/munkeefonix/
//
//  Input values:
//  Daily Interval: If checked then days are used for the interval.  If unchecked then minutes will be used.
//  Interval: The interval to use for the indicator. 

study("Ichimoku Cloud Time", shorttitle="Ichi Time", overlay=true)

multIntra()=>(isintraday ? 1.0 : (isdaily ? 1440.0 : isweekly ? 10080.0 : 43320.0))
multDaily()=>multIntra() / 1440.0

_con=input(9, "Conversion", integer, minval=1)
_turn=input(26, "Turn", integer, minval=1)
_lag=input(52, "Lag", integer, minval=1)
_offset=input(26, "Displacement", integer, minval=1)
_useDaily=input(false, "Daily Interval")
_t=input(60.0, "Interval", float, minval=1.0) / (_useDaily ? multDaily() : multIntra())

per(v, p)=> round(v * (p / interval))
conversion (c,p)=> ((highest(high, per(c, p))+lowest(low, per(c, p))) / 2.0) 
senkouA (p)=> ((conversion(_con, p) + conversion(_turn, p)) / 2.0) 

_offsetAdj=per(_offset, _t)
 
sA = plot(senkouA(_t), color=#999999, offset=_offsetAdj, title="Leading Span A", linewidth=1)
sB = plot(conversion(_lag, _t), color=#999999, offset=_offsetAdj, title="Leading Span B", linewidth=2)
fill(sA, sB, color=#333333, transp=60, title="Leading Fill Color")
 
plot(conversion(_con, _t), color=#006699, linewidth=2, title="Conversion Line")
plot(conversion(_turn, _t), color=#0099CC, linewidth=2, title="Base Line")
plot(close, color=#333333, linewidth=1, offset=-_offsetAdj, title="Lagging Span")