1.What is Center of Gravity Moving Average Oscillator?
The Center of Gravity Moving Average Oscillator is a technical indicator that combines moving averages with prices' oscillatory characteristics. It aims to find the price's center or equilibrium point by analyzing its variations to predict market dynamics.
2.Center of Gravity Moving Average Oscillator Instructions
2.1.Center of Gravity Moving Average Oscillation Indicator The center of Gravity Moving Average Oscillator indicator is calculated similarly to the MACD. It involves the product of a linear weighted moving average and a simple moving average, followed by three rounds of smoothing to generate the final signal. The indicator uses the zero axis as a symmetry axis; the greater the deviation from the zero axis, the stronger the current trend.
Center of Gravity Moving Average Oscillation Indicator Parameters:
p1 = 20: Time period for the linear weighted moving average and simple moving average
p2 = 4: Time period for the second smoothing after multiplying the linear weighted moving average and simple moving average
p3 = 4: Time period for the third smoothing

2.2.Average Speed Indicator The Average Speed Indicator calculates the average magnitude of price movement over a unit of time (1 minute). Similar to average speed in physics, a larger value indicates a stronger momentum of the current price. The lower bound of the Average Speed Indicator is zero, and the denominator adjusts according to the selected K-line period. The final result represents the magnitude of price movement corresponding to a unit of time (1 minute).
Average Speed Indicator Parameters:
p1 = 6 Calculation period for the average speed
period = '1h' Time period of the K line

3.Center of Gravity Moving Average Oscillation Parameter Configuration
3.1.Opening Conditions
Conditions of Opening Long Positions:
1.Both the current "Center of Gravity" indicator (gravity[-2]) and the previous "Center of Gravity" indicator (gravity[-1]) are less than zero.
2.The current "Center of Gravity" indicator is greater than the previous centroid indicator.
3.The current average speed indicator (velocity[-1]) is above the median of average speed (threshold).
pseudo code: gravity[-2] < gravity[-1] < 0 and velocity[-1] > threshold
Conditions of Opening Short Positions:
1.Both the current "Center of Gravity" indicator (gravity[-2]) and the previous "Center of Gravity" indicator (gravity[-1]) are more than zero.
2.The current "Center of Gravity" indicator is less than the previous centroid indicator.
3.The current average speed indicator (velocity[-1]) is above the median of average speed (threshold).
pseudo code:
gravity[-2] > gravity[-1] > 0 and velocity[-1] > threshold
3.2.Closing Conditions
Conditions of Closing Long Positions:
1.Meeting the conditions of opening short positions
2.Reaching Take-Profit Level; the take-profit level is calculated as follows:
Opening Price + Profit Ratio * Current ATR
Note: the take-profit/stop-loss level is dynamically adjusted based on the current ATR calculated using the latest k-line. Similarly,
or
3.Reaching Stop-Loss Level; the stop-loss level is calculated as follows:
Opening Price - Current ATR
Conditions of Closing Short Positions:
1.Meeting the conditions of opening long positions; or
2.Reaching Take-Profit Level; the take-profit level is calculated as follows:
Opening Price + Profit Ratio * Current ATR
3.Reaching Stop-Loss Level; the stop-loss level is calculated as follows:
Opening Price + Current ATR
3.3. Parameters Configuration
Leverage: The leverage multiplier used by the user for investments, which is used to calculate order quantities.
Total Investment Amount: The total amount of funds invested by the user, used entirely for margin.
Automatic Stop-Loss Ratio: When the loss of the total investment amount reaches this ratio, the bot will execute an exit and close positions.
Linear Weighted Smoothing Period 1: the period of linear weighted moving average and simple moving average in the "Center of Gravity Moving Average Oscillation"
Linear Weighted Smoothing Period 2: the smoothing period applied after multiplying the linear weighted moving average and simple moving average.
Linear Weighted Smoothing Period 3: the time period for the third smoothing.
Average Speed Period: the time period used in the average speed indicator.
ATR Period: the time period for the ATR.
Take-Profit/Stop-Loss Ratio: a ratio of 1.5 indicates that the take-profit level is 1.5 times the stop-loss level.
Period: Standard MA parameter. Required; options include 1 minute, 5 minutes, 15 minutes, 30 minutes, 1 hour, 4 hours, 8 hours, 1 day; 1 hour by default
Order Quantity: The number of orders placed when a signal is triggered. Optional; empty by default
Futures Fee by Default: 0.00075
Inverse Futures: s = (Margin ✖️ Lastest Price) / (2 ✖️ 0.00075 + (1/Leverage)) size = s / value per Contract
Forward Futures: s = (Margin) / (2 ✖️ 0.00075 + (1/Leverage)) ✖️ Latest Price size = s / value per Contract
The actual order quantity will be the smaller value of the calculated value by default and the user-set value.
4.How to Create the Center of Gravity Moving Average Oscillator
Web: Bots - Create a Bot - Futures - CTA - Center of Gravity Moving Average Oscillation - Backtest - Set Parameters - Create
Backtesting Process: Click the "Backtest" button, enter the expected parameters, and click "Backtest." The system will automatically backtrack data (within one month by default) and generate a reference backtest record in the "Backtest Records."

App: Trade - Bots - Click on the first icon in the upper right corner - Create a new strategy - System recommended strategy - Center of Gravity Moving Average Oscillation - Backtest - Set the Parameters - Create
Gate reserves the final right to interpret the product. For further assistance, please visit the Gate official support page or contact our customer support team.
