Skip to main content

SMA Crossover

Gunbot employs a strategy based on the Simple Moving Average (SMA) to determine optimal buy and sell points. This strategy identifies when prices are increasing, as signaled by the quick SMA crossing above the longer term SMA, prompting a purchase. Conversely, selling occurs when the quick SMA moves below the longer term SMA.

Simple Moving Average (SMA) is a technical analysis tool for detecting market trends. It computes the average price of an asset over a given time frame by adding up closing prices and dividing the sum by the number of periods. The outcome is a smooth line that reveals whether the market is trending up or down.

Gunbot's approach takes advantage of two SMA lines crossing over to indicate possible buying and selling opportunities. A quick SMA line is derived from a shorter time frame, while a longer term SMA line comes from a longer time frame. If the quick SMA crosses above the longer term SMA, it suggests an upward trend shift, making buying advantageous. In contrast, if the quick SMA moves below the longer term SMA, it indicates a downward trend shift, necessitating selling. This technique assists traders in making well-informed choices based on market trends.

Utilizing the Method

Gunbot initiates one position, either long or short, and closes it upon reaching the target. If the stop is triggered before successfully closing a trade, Gunbot sets a stop order at a loss. After concluding a position, Gunbot resumes seeking new long or short positions. Gunbot does not contribute to existing open positions.

Buying Method Conditions

Initiating a long position is permitted when FAST_SMA surges over SLOW_SMA.

Selling Method Conditions

Starting a short position is allowed when FAST_SMA descends under SLOW_SMA.

Closing Conditions

A position is closed when the intended ROE (return on equity) is achieved. This percentage is calculated from the entry point, factoring in leverage.

Stopping Conditions

A position is closed at a loss when the negative ROE reaches the STOP_LIMIT objective.