Features:
Parameters:
| Parameter Name | Description |
|---|---|
| InpFastEMAPeriod | Fast EMA period (default 20). |
| InpSlowEMAPeriod | Slow EMA period (default 50). |
| InpATRPeriod | ATR period (default 14). Used for the smoothing threshold, the EMA distance filter and the arrow offset. |
| InpMultiplier | Signal sensitivity (default 0.8). ATR multiple that decides when the smoothed candle snaps to the raw Heiken Ashi values. Lower values follow price more closely; higher values give a smoother, slower candle. |
| InpBlendFactor | Signal blend factor (default 0.3, range 0-1). Weight given to the new Heiken Ashi open/close when blending on small moves. Lower values smooth more; higher values react faster. |
| InpMinEmaSeparationATR | EMA distance filter (default 0.25). A signal only qualifies while the gap between Fast and Slow EMA is no larger than this many ATRs. Lower values are stricter and fire only when the EMAs are very tight; higher values allow signals in more developed trends. |
| InpArrowOffsetATR | Distance of the arrows from the candle, as a fraction of ATR (default 0.30). |
| InpSignalsEnabled | Enables or disables signal alerts (default true). Arrows are still drawn on the chart when this is off. |
| InpPopupAlert | Show a popup alert when a signal appears (default true). |
| InpPushAlert | Send a push notification to the mobile terminal when a signal appears (default false). |
Notes and Limitations:
Screenshots:

Conclusion:
If you like the clarity of Heiken Ashi but want fewer false colour flips, this indicator smooths the candles with an ATR-based filter, adds an EMA trend bias, and marks early entries with clean arrows and optional alerts - all in one self-contained file.
Smart Loss Exit — early exit for losing positions (ATR adverse excursion, time in trade, EMA invalidation, RSI, money cap) with a CSV journal
Closes losing positions early, before the full stop-loss, when a rule says the trade is not coming back: adverse move beyond N x ATR, too long in loss, EMA trend flipped, RSI against the position, or a money cap. Never touches a position in profit. Observe-only mode journals what would be closed without closing anything. Every exit is written to CSV with the rule, the age and the maximum adverse excursion, so the rules can be tuned from data.
Risk Guard — risk-based lot size, daily loss lock, max positions, oversized-trade trim, forced stop-loss
Enforces your own risk rules on every position, whether opened by hand or by another EA: shows the lot size that matches your risk, locks the account for the day after a set loss, caps open positions, trims positions that risk more than allowed, and adds a stop-loss to any position opened without one.
Position sizing from risk, using the broker's own tick value and volume step
Position size from a risk amount, computed from the symbol's real tick value, tick size and volume step rather than an assumed pip value. It always rounds volume down, and when your risk is smaller than the minimum lot it says so and reports what that lot actually costs. No terminal state, so the sizing logic is testable offline - a 41-assertion test script is included.
CSetupLedger: a per-setup win rate ledger for Expert Advisors
Scores every setup type in your EA on its own record instead of lumping them into one equity curve. Rebuilds itself from the account's deal history on init so a restart cannot wipe the record. Prints a Wilson score lower bound next to the raw win rate so a three trade hot streak stops looking like an edge.