This indicator was designed to remove trend from price and make it easier to identify cycles.
Although this indicator has similarities to MACD. It is better used to identify the cycle of High and Lows based on the Statistical Data (Default is set to 25).

**** DO NOT USE THIS AS A MOMENTUM INDICATOR ****

Uday C Santhakumar
สคริปต์โอเพนซอร์ซ

ด้วยจิตวิญญาณของ TradingView อย่างแท้จริง ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้ผู้ค้าสามารถเข้าใจและตรวจสอบได้ ไชโยให้กับผู้เขียน! คุณสามารถใช้ได้ฟรี แต่การใช้รหัสนี้ซ้ำในสิ่งพิมพ์อยู่ภายใต้กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?
// Created by UCSgears 
// Version 1 - Setting for the Power cycle is not determined yet. This is the concept. 
// Larry Gaines version of Cycle uses Linear Regression

study(title="UCS_Cycle_V1", shorttitle="UCS-Cycle", overlay=false)

// Classic Cycle Indicator uses SMA
UseLinearRegression = input(true)
PlotSignal = input(false)

// The Source can be Based on OHLC4 or HL2
src = (ohlc4)
len = input(25, title="Cycle Length")
smooth = input (8, title = "Signal")
basis = UseLinearRegression ? linreg(src, len, 0) : sma(src,len)

cycle = close - basis
cyclesig = PlotSignal ? ema(cycle,smooth) : 0

plot_color1 = cycle > 0 ? green : red

plot(cycle, color = plot_color1, title = "Linear Regression Curve", style = columns, linewidth = 4)
plot(cyclesig, color = gray, title = "Signal")

//END
// Version 2 will have all the settings for the 3 Power Cycle Bands with Options to Plot them all.