Select Page

APIBridgeTradingView

Strategy Premise

This strategy uses COG (Center of Gravity ) for deriving the baseline. the Center of Gravity is used for future price movements and price reversals The COG consists of two lines and is based on the sum of prices over a specified period. A moving average of the COG is plotted along the indicator to act as a signal line. The classic form of the indicator is an oscillator, using a weighted moving average. This enables it to track the price action better than many other channels that make use of MAs or simply “close”. The indicator also marks “squeezes” (stdev bands come inside ATR bands)

In this strategy, we use the ATR Channel. The ATR Channel is a volatility based technical indicator composed of three separate lines. Upper line, lower line, and middle line. The middle line is an EMA of the price. When Price is Below the lower ATR Chanel Send Long signal and Price Above the Upper ATR Channel Send Short signal

COG Channel Algo Strategy

Strategy Logic

Long Entry: When Closing Price Below Lower ATR Chanel, Send LE.

Long Exit: Either when SL or Target is hit. If SL/TGT is not hit and Closing Price Above Upper ATR Channel, send LX and SE

Short Entry: When Closing Price Above Upper ATR Channel, Send SE

Short Exit: Either when SL or Target is hit. If SL/TGT is not hit and Closing Price Below Lower ATR Chanel, SX and LE

COG Channel  Strategy Parameters for TradingView Charts

1. Length(Mandatory): This is the number of bars used to calculated Ex: 14 à previous 14 candles are used.

2. Mult: Multiply By Length 

3. Quantity: This is used to specify the trade quantity 

4. Custom Stop Loss in Points: Movement in chart price against the momentum which will trigger exit

5. Custom Target in Points: Movement in chart price against the momentum which will trigger exit

 

TradingView Settings

1: Download The Pine Script Algo  here

2: Open desired Chart in trading View with normal Candlestick, Select the desired timeframe of the chart, Go to the pine editor section, remove the default code, paste the downloaded code, save the file, and to chart

COG Channel Algo Strategy

3: You can optimize your strategy by changing the input parameters, using “Settings” of  COG Channel  Strategy.

COG Channel Algo Strategy

Setting Up Alert

Before setting up an alert, make sure of few things. (1) You have selected the desired script, timeframe, and strategy settings. (2) API bridge is configured and running. Once you have made sure, click on settings. Then add alert and paste {{strategy.order.comment}} in the message box. 

Important: do not change any settings during live trading. 

NOTE: The pinescript works both with webhook alerts (TV Pro plan) and normal popup alerts (TV free plan).

COG Channel Algo Strategy