1Copy the scriptPress Copy script above, or the copy button on the code below.
2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.
Source Code
84 lines of Pine Script v4 from Center Of Gravity Oscillator.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.
Center Of Gravity Oscillator plots the oscillator alongside an Arnaud Legoux Moving Average trigger line, a Least Squares Moving Average, historical high and low bounds, and optional Fibonacci retracement levels based on oscillator ranges. Preset themes customize layout options. Plotted in a separate indicator pane.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Theme:
string
CUSTOM
theme
src
source
close
src
length
int
9
length
Use Smoothing?
string
NONE
smooth
Smoothing Length
int
2
length5
Previous Hig/Low Length
int
20
length2
LSMA Length
int
200
length3
fib Length
int
1000
length4
Fib Color
color
color.white
col1
Show Fibonacci Levels?
bool
false
fib
Show Price Line?
bool
true
pline
Dual colored trigger?
bool
false
showcol
Show all 16 settings
Setting
Type
Default
Variable
Show High/Low Levels
bool
false
showhl
Trigger Window Size
int
3
windowsize
Trigger Offset
float
0.85
offset
Trigger Sigma
float
6
sigma
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
This indicator combines a scaled Forecast Oscillator with a Point of Force state detector. The Forecast Oscillator calculates the percentage deviation of price from its linear regression curve and normalizes the output between 0 and 1, plotting a line in a sep
This indicator plots the Commodity Channel Index in a separate pane and surrounds it with a Donchian channel whose lookback length changes with volatility. It measures volatility as a ratio of short and long ATR values, then ranks that ratio and shortens or le
This indicator tracks intermediate market cycles inspired by Linda Raschke's approach using daily NYSE TICK statistics. It fetches daily high, low, and close values for the TICK index via security requests and computes moving averages of the highs and lows. It
WaveTrend 3D is a redesigned oscillator that implements the classic WaveTrend algorithm with kernel-based regression for trend reversal confirmation and multi-timeframe support. It calculates a smoothed oscillator line and displays a symmetrical three-dimensio
Benso Pendulum is an indicator that plots a customizable Relative Strength Index (RSI) oscillator in a separate pane on the price chart. It calculates the RSI using the specified source and period, applying dynamic colors that change based on overbought and ov
This indicator plots currency strength values for EUR, USD, JPY, GBP, CHF, AUD, CAD, NZD and optionally XAU or XAG on a separate pane. It computes strength by comparing current pair closes to daily closes using broker-specific data from OANDA, FX or FOREXCOM.