2026-10-05 10:17:43 -04:00 | | | //+------------------------------------------------------------------+
|
| | | //| Simple_MA.mq5 |
|
| | | //| MathewCole |
|
| | | //| https://www.ColBekATS |
|
| | | //+------------------------------------------------------------------+
|
2026-10-05 10:26:22 -04:00 | | |
|
| | |
|
| | |
|
| | | // --- MQL5 Libraries ---
|
| | | #include <Trade\Trade.mqh> // we only use simple trade objects
|
| | | //#include <Controls/Dialog.mqh>
|
| | | //#include <Controls\Button.mqh>
|
| | | //#include <Controls\Label.mqh>
|
| | | //#include <Controls\ComboBox.mqh>
|
| | | //#include <Controls\Edit.mqh>
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
2026-10-05 10:17:43 -04:00 | | | //+------------------------------------------------------------------+
|
| | | //| Expert initialization function |
|
| | | //+------------------------------------------------------------------+
|
| | | int OnInit()
|
| | | {
|
| | | //--- create timer
|
| | | EventSetTimer(60);
|
| | |
|
| | | //---
|
| | | return(INIT_SUCCEEDED);
|
| | | }
|
| | | //+------------------------------------------------------------------+
|
| | | //| Expert deinitialization function |
|
| | | //+------------------------------------------------------------------+
|
| | | void OnDeinit(const int reason)
|
| | | {
|
| | | //--- destroy timer
|
| | | EventKillTimer();
|
| | |
|
| | | }
|
| | | //+------------------------------------------------------------------+
|
| | | //| Expert tick function |
|
| | | //+------------------------------------------------------------------+
|
| | | void OnTick()
|
| | | {
|
| | | //---
|
| | |
|
| | | }
|
| | | //+------------------------------------------------------------------+
|
| | | //| Timer function |
|
| | | //+------------------------------------------------------------------+
|
| | | void OnTimer()
|
| | | {
|
| | | //---
|
| | |
|
| | | }
|
| | | //+------------------------------------------------------------------+
|
| | | //| Trade function |
|
| | | //+------------------------------------------------------------------+
|
| | | void OnTrade()
|
| | | {
|
| | | //---
|
| | |
|
| | | }
|
| | | //+------------------------------------------------------------------+
|
| | | //| ChartEvent function |
|
| | | //+------------------------------------------------------------------+
|
| | | void OnChartEvent(const int32_t id,
|
| | | const long &lparam,
|
| | | const double &dparam,
|
| | | const string &sparam)
|
| | | {
|
| | | //---
|
| | |
|
| | | }
|
| | | //+------------------------------------------------------------------+
|