Exp_DiNapoliStochastic
This EA trades based on the DiNapoli Stochastic indicator, opening buy positions when the indicator line crosses above the signal line and sell positions when it crosses below. It supports configurable money management modes, stop loss/take profit, and independent toggle switches for opening and closing positions on both sides. Trades are executed only on new bars to avoid redundant signals.
Open the interactive view (equity curve, symbol switch)Key facts
Backtest results (H1, about 1 year)
Not backtested yet — this EA could not be converted automatically.
Strategy analysis
This EA uses the DiNapoli Stochastic indicator as its core trading signal source, implementing a momentum crossover strategy. Entry conditions: a buy signal is generated when the indicator line crosses above the signal line, and a sell signal is generated when it crosses below, determined by comparing indicator and signal values across two consecutive bars. Exit conditions: long positions are closed when the indicator line crosses below the signal line, and short positions are closed on the opposite crossover, with fixed stop loss and take profit levels in points. Position sizing supports five modes: percentage of free margin, percentage of balance, percentage of free margin after losses, percentage of balance after losses, and fixed lot size. Money management is controlled by the MM parameter for sizing ratio and the MMMode parameter for the calculation method. The EA employs an IsNewBar mechanism to ensure signals are calculated only once per bar, preventing redundant trade entries, and verifies indicator data readiness via BarsCalculated before processing.
Strengths
- Independent toggle switches for buy/sell opening and closing provide flexible directional control
- New bar detection mechanism prevents redundant trades within the same bar
- Five position sizing modes accommodate different risk preferences
- Stop loss and take profit settings provide basic risk control
- DiNapoli Stochastic reduces market noise compared to traditional stochastic oscillators
Weaknesses
- No spread filter, which may result in unfavorable fills during high-spread conditions
- No position check mechanism, potentially opening duplicate positions in the same direction
- Fixed stop loss and take profit in points without ATR-based dynamic adaptation to volatility
- Depends on external indicator file DiNapoliStochastic without embedded fallback handling
- Garbled comments due to encoding issues severely impact readability and maintainability
Possible improvements
- Add position existence checks to prevent duplicate same-direction entries
- Implement spread filtering and ATR-based dynamic stop loss/take profit for better adaptability
Risk assessment
Overall risk: Medium
- Missing position check may lead to duplicate same-direction entries amplifying risk
- Fixed stop loss/take profit does not adapt to volatility changes, potentially insufficient during extreme market conditions
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Money management: controls lot size or ratio |
MMMode | LOT | Money management mode: fixed lot, balance ratio, equity ratio, etc. |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Max price slippage deviation |
BuyPosOpen | true | Allow buy position open |
SellPosOpen | true | Allow sell position open |
BuyPosClose | true | Allow close long positions |
SellPosClose | true | Allow close short positions |
InpInd_Timeframe | PERIOD_H6 | Indicator timeframe |
FastK | 8 | Fast %K period |
SlowK | 3 | Slow %K smoothing period |
SlowD | 3 | Slow %D signal line smoothing period |
Shift | 0 | Indicator shift offset |
SignalBar | 1 | Bar index for entry signal |
Similar Momentum EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.