coding

Your First MQL5 Expert Advisor: Closed-Bar Signals and Demo Orders

Your First MQL5 Expert Advisor: Closed-Bar Signals and Demo Orders

Technical revision: 1 October 2026 · Educational materialOn this pageMake the rules explicitRead the execution policyEstimate risk without forcing the minimum lotDo not confuse a request with a fillRun a behavior test before a performance testThis tutorial turns a simple moving-average crossing into a complete educational EA. Follow it at your own pace: installation, compilation and verification take longer when your broker has different symbol specifications. The source is a learning exercise, with no published profitability claim. Make the rules explicit A buy signal occurs when the fast EMA was at or below the slow EMA on bar 2 and…
Read More
MQL5 from Scratch: Build an Expert Advisor Step by Step

MQL5 from Scratch: Build an Expert Advisor Step by Step

Technical revision: 1 October 2026 · Educational materialOn this pageDefine the behavior before writing the entryCreate a small project in MetaEditorSeparate initialization, observation and executionAdd execution only after the log makes senseCheck observable behaviorA first Expert Advisor should help you see what the terminal is doing. Start with an observable program, then add one responsibility at a time. This guide takes you from event handlers to a moving-average demonstration whose order submission is disabled by default. Define the behavior before writing the entry Our example reads two exponential moving averages on the chart symbol and timeframe. A signal is a…
Read More