// Downloaded From https://www.WiseStockTrader.com SetTradeDelays(0,0,0,0); BuyPrice = C; SellPrice = C; SetBarsRequired(200, 0); function CGOscillator(Price, Length) { Result = 0; for (i=length; i< BarCount; i++) { Num = 0; Denom = 0; for (j=0; j= HoldDays); Sell = ExRem (Sell,Buy); e = Equity(); shape = Buy * shapeUpArrow + Sell * shapeDownArrow; Plot( Close, "Price", colorBlack, styleCandle ); PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, Low, High ) ); GraphXSpace = 5; Plot(e,"Equity",colorRed,styleLine|styleOwnScale); Plot(CGO, "CG Oscillator", colorRed, styleLine|styleLeftAxisScale); Plot(CGOSmoothed, "CGO Smoothed", colorBlue, styleLine|styleLeftAxisScale); //Figure 10.1 Center of Gravity