Compile logCompiled
MetaEditor build 6333 · MT5 · 1 Dec 2026, 10:21 UTCcompiling FXN_MTFMovingAverage.mq5✓ Result: 0 errors, 0 warnings, 3.5 soutput FXN_MTFMovingAverage.ex5 · 22 KBsha256 1423f9ddded7d546…26ab08bf
Files version 1.0
| File | Lines | Size |
|---|---|---|
| FXN_MTFMovingAverage.mq5 | 176 | 6 KB |
| FXN_MTFMovingAverage.ex5 compiled by the Lab | – | 22 KB |
FXN_MTFMovingAverage.mq5176 lines
//+------------------------------------------------------------------+//| FXN_MTFMovingAverage.mq5 |//| FXNook Lab Hub starter library - MIT licence |//| https://lab.fxnook.com/hub |//+------------------------------------------------------------------+#property copyright "FXNook Lab (MIT licence)"#property link "https://lab.fxnook.com/hub"#property version "1.00"#property description "A moving average from a higher timeframe drawn on the current chart, as steps or a smoothed line."#property indicator_chart_window#property indicator_buffers 1#property indicator_plots 1#property indicator_label1 "MTF MA"#property indicator_type1 DRAW_LINE#property indicator_color1 clrOrange#property indicator_width1 2enum ENUM_MTF_DRAW{ MTF_STEP = 0, // Steps (one flat value per higher-timeframe bar) MTF_SMOOTH = 1 // Smoothed (straight line between higher-timeframe values)};//--- inputsinput group "Moving average"input ENUM_TIMEFRAMES InpTimeframe = PERIOD_H4; // Higher timeframe to take the average frominput int InpPeriod = 50; // Moving average period (in higher-timeframe bars)input ENUM_MA_METHOD InpMethod = MODE_EMA; // Moving average typeinput ENUM_APPLIED_PRICE InpPrice = PRICE_CLOSE; // Price usedinput group "Display"input ENUM_MTF_DRAW InpDrawMode = MTF_STEP; // Drawing modeinput color InpColor = clrOrange; // Line colourinput int InpWidth = 2; // Line width (1-5)input int InpMaxBars = 5000; // Chart bars to draw (0 = all bars)//--- buffersdouble BufMa[];Sign in to read all the code and download it
It is free. A free account lets you see every line, copy it, download the source and open a copy in your Lab. The compiled file can be downloaded without an account.