Skip to content
All library documents

AMA and RSI Signals with Martingale Position Scaling

Article MQL5 code base

Summary

The EA described combines the Adaptive Moving Average (AMA) and Relative Strength Index (RSI) in a two-stage signal. For a buy example, RSI must first fall below a configurable level of 30, and price must then cross above AMA within a configurable number of bars. The spacing between those conditions is intended to let users explore combinations of the indicators. Sell-side details are not specified in the description.

After a signal, the EA opens two positions in the same direction if existing positions on that side have negative profit, otherwise it opens one. It can close all positions on the symbol when their combined profit reaches a configured limit. It also tracks the account balance at startup and describes withdrawing a configured amount after balance growth exceeds that amount, followed by closing positions. The example is identified for EURUSD on a five-minute chart, but supplies no backtest results. Martingale scaling and the balance-based withdrawal rule are presented without risk analysis or evidence of robustness.

Key ideas

  • The buy signal requires RSI below 30 followed by price crossing above AMA.
  • A configurable bar distance separates the indicator conditions.
  • When positions on the signaled side are losing, the EA opens two positions instead of one.
  • A configured total-profit threshold can trigger closure of the EA's positions on the symbol.
  • The description gives no performance evidence or assessment of the risks from martingale scaling.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.