STEA Supertrend
- Experts
- Version: 1.0
- Activations: 5
A fully automated trend-following system built on the classic Supertrend indicator, enhanced with ADX, Moving Average, and Volatility filters to reduce false signals in sideways markets — plus dynamic risk-based Stop Loss, Take Profit, and Trailing Stop management.
How It Works
This EA is built directly on the widely-used Supertrend indicator logic (ATR-based trend-following bands). Instead of just plotting signals on a chart, it trades them automatically:
-
Trend Detection — The EA calculates the Supertrend bands using ATR (Average True Range) and a configurable multiplier. When price closes above/below the band and the trend flips direction, a Buy or Sell signal is generated — exactly the same "Buy"/"Sell" signal points you'd see on the original Supertrend indicator.
-
Smart Entry Filters — Before acting on a signal, the EA checks three independent filters to confirm the market is actually trending (not choppy/sideways):
- ADX Filter — confirms trend strength is above a minimum threshold.
- Moving Average Filter — confirms price direction aligns with a longer-term MA slope.
- Volatility Filter — confirms current ATR is not abnormally low (a sign of a quiet, range-bound market).
Only when a signal passes these filters does the EA open a trade — this significantly reduces the whipsaw losses that a raw Supertrend strategy suffers during sideways conditions.
-
Risk-Defined Stop Loss — The Stop Loss is placed exactly at the Supertrend's "trend begins" level (the same point shown by the indicator's Buy/Sell arrows), giving every trade a logical, volatility-adjusted risk level instead of an arbitrary fixed number of pips.
-
Reward Target (Take Profit) — Take Profit is calculated as a multiple of the Stop Loss distance (Risk:Reward ratio), fully adjustable — default is 1:2.
-
Profit Protection (Trailing Stop) — Once a trade reaches a configurable profit milestone (default 1:1 Risk:Reward), the EA activates a trailing stop that locks in profit as price continues moving favorably, protecting gains without needing to manually manage the trade.
-
Automatic Position & Risk Management — Lot size can be fixed or automatically calculated from a percentage of account risk. The EA also verifies available margin before every trade to avoid failed/rejected orders.
In short: this EA automates the entire Supertrend trading process — from signal detection, to trend confirmation, to entry, to profit protection — with no manual chart-watching required.
Key Features
- ✅ Based on the classic, proven Supertrend (ATR trend-following) strategy
- ✅ Three independent trend/sideways filters (ADX, MA, Volatility) — each can be enabled/disabled separately
- ✅ Stop Loss anchored to actual market structure (Supertrend trend-reversal level), not arbitrary pips
- ✅ Configurable Risk:Reward Take Profit ratio
- ✅ Automatic Trailing Stop with configurable trigger and distance
- ✅ Fixed lot or risk-percentage based position sizing
- ✅ Automatic margin check before every trade — no failed/rejected order spam
- ✅ Works on any symbol and any timeframe (Forex, Gold, Indices, Crypto CFDs, etc.)
- ✅ 100% input-driven — every parameter can be adjusted from the Inputs tab, no coding or recompiling required
- ✅ Compatible with netting and hedging account types
Input Parameters Explained
Supertrend Settings
| Parameter | Description |
|---|---|
| ATR Period | Number of bars used to calculate ATR (volatility) |
| ATR Multiplier | Distance multiplier for the Supertrend bands — higher value = wider bands, fewer but more reliable signals |
| ATR Calculation Method | Wilder/RMA (smoother) or SMA of True Range |
| Source Price | Price used for calculation (HL2, Close, HLC3, OHLC4) |
| Calculation Bars | Number of historical bars used to compute the trend (increase for more stability on lower timeframes) |
Entry / Lot Settings
| Parameter | Description |
|---|---|
| Use Risk % for Lot | If enabled, lot size is calculated automatically from account risk % instead of a fixed lot |
| Fixed Lot | Lot size used when risk-based sizing is off |
| Risk Percent | % of account balance risked per trade (used only if risk-based sizing is on) |
| Close Opposite On Signal | Automatically closes an opposite open position when a new signal appears |
| One Trade Per Signal | Prevents opening duplicate trades in the same direction |
| Magic Number | Unique ID to separate this EA's trades from other EAs/manual trades |
Take Profit
| Parameter | Description |
|---|---|
| Use Take Profit | Enable/disable automatic TP |
| Risk:Reward Ratio | TP distance = Stop Loss distance × this ratio (e.g. 2.0 = 1:2) |
Trailing Stop
| Parameter | Description |
|---|---|
| Use Trailing Stop | Enable/disable trailing stop management |
| Trailing Trigger (R:R) | Profit level (as a multiple of SL distance) at which trailing starts |
| Trailing Distance (R:R) | How far behind the current price the trailing SL is kept |
| Move To Breakeven First | If enabled, SL moves to entry price first before trailing further |
Trend Filters
| Parameter | Description |
|---|---|
| Use ADX Filter | Enable/disable the trend-strength filter |
| ADX Period / Threshold | ADX must be above this threshold for a trade to be allowed |
| Use MA Filter | Enable/disable the trend-direction filter |
| MA Period / Method / Slope Bars | Confirms price is aligned with a longer-term trend direction |
| Use Volatility Filter | Enable/disable the low-volatility (sideways) filter |
| Volatility Avg Period / Min Ratio | Current ATR must be at least this ratio of its recent average to trade |
Recommended Starting Settings by Timeframe
These are starting points, based on internal backtesting — always run your own optimization in Strategy Tester for your specific broker and instrument before going live.
| Parameter | M1 | M5 | M15 | M30 | H1 | H4 |
|---|---|---|---|---|---|---|
| ATR Period | 14 | 12 | 10 | 10 | 10 | 10 |
| ATR Multiplier | 4.5 | 3.8 | 3.0 | 2.8 | 2.5 | 2.2 |
| ADX Threshold | 30 | 27 | 22 | 20 | 18 | 17 |
| MA Period | 200 | 150 | 100 | 90 | 60 | 50 |
| Volatility Min Ratio | 1.00 | 0.90 | 0.80 | 0.75 | 0.70 | 0.65 |
| Risk:Reward Ratio | 2.5–3.0 | 2.2–2.5 | 2.0 | 2.0 | 2.0 | 1.8–2.0 |
Note: Lower timeframes (M1/M5) are more sensitive to spread, slippage, and commission relative to price movement. Results will vary significantly by broker execution quality and instrument.
Risk Warning
Past backtest performance does not guarantee future results. Forex, Gold, and CFD trading involves substantial risk of loss and is not suitable for all investors. Always test thoroughly on a demo account before trading with real funds, and never risk more than you can afford to lose. This product is a trading tool, not financial advice.
Support
For questions about settings or optimization, feel free to send a message through the product's comments/support tab. Recommended: run the built-in Strategy Tester optimizer on your target symbol/timeframe before live trading to fine-tune the filter settings for current market conditions.
