OsMA EA: no-code builder for MT4 / MT5
TrendOsMA is the MACD line minus the signal line, also known as the MACD histogram. Bars turning from negative to positive show momentum picking up. It's often used to catch the stretch where a trend accelerates.
Rules you can build with it
Works as an entry rule or an exit rule. Short rules are mirrored automatically.
- LongOsMA risesShortOsMA falls
- LongOsMA fallsShortOsMA rises
- LongOsMA is above 0 points(adjustable level)ShortOsMA is below 0 points
- LongOsMA is below 0 points(adjustable level)ShortOsMA is above 0 points
- LongOsMA crosses above 0 points(adjustable level)ShortOsMA crosses below 0 points
- LongOsMA crosses below 0 points(adjustable level)ShortOsMA crosses above 0 points
- LongOsMA turns upShortOsMA turns down
- LongOsMA turns downShortOsMA turns up
Settings
| Settings | Default | Range |
|---|---|---|
| Fast period | 12 | 2 – 50 |
| Slow period | 26 | 5 – 100 |
| Signal period | 9 | 2 – 30 |
| Price | Close | Close / Opening price / High / Low / Median price / Typical price / Weighted close |
| Level (points) | 0 | -300 – 300 |
How the backtest and the EA calculate it
Equal to MT5's OsMA (MACD line − signal line, which is a simple average); levels are in points, and short rules mirror the level around zero.
Signals use only closed candles and are filled at the next candle's open. The exported EA checks conditions in the same order, so you get similar results in the MT5 Strategy Tester.
Example strategies
- Entry · OsMA (12, 26, 9, Close): OsMA rises
- Stop-loss 300 points, take-profit 600 points
- Entry · OsMA (12, 26, 9, Close): OsMA rises
- Entry · Moving Average (50, EMA, Close): MA rises
- Stop-loss 300 points, take-profit 600 points
Examples are just a starting point: open one to change settings or add filters, then check it with backtests and robustness tests. Backtest results don't indicate future returns.