Skip to main content

EMA Spread

Gunbot employs the Exponential Moving Average (EMA) technique to develop a trading approach that focuses on buying at the beginning of an upward trend and selling when prices start to decline. This is accomplished by observing the spread between rapid and sluggish EMAs, with purchases happening as the spread narrows and sales occurring when the spread contracts again due to falling prices.

Each cycle, the spread is determined by deducting the lowest EMA value from the highest EMA. In addition to this primary indicator, other instruments can be employed to fine-tune the buy and sell signals. For instance, you might opt to use the Relative Strength Index (RSI) for additional confirmation of signals.

Calculating the Spread

During each cycle, the spread is computed by subtracting the lowest EMA value from the highest EMA value.

Working with EMA Spread

This section explains how the emaspread strategy functions in futures trading. The trade triggers diverge somewhat from those used in spot trading.

Gunbot initiates a single position, either long or short, and closes it upon reaching the target. If the stop is activated before realizing a profit, Gunbot will execute a stop order at a loss. Following the closure of a position, Gunbot aims to establish a new long or short position.

Long Position Requirements

A long position is permitted when the fast EMA is lower than the slow EMA, and the spread narrows.

Short Position Requirements

A short position is allowed if the fast EMA is above the slow EMA, and the spread contracts.

Closing Conditions

A position is closed once the intended ROE (Return on Equity) has been attained.

Stop Conditions

When the negative ROE meets the STOP_LIMIT objective, a position is closed at a loss.