| //+------------------------------------------------------------------+
|
| //| Copyright (C) 2026, boyvlad |
|
| //| https://www.mql5.com/en/users/boyvlad |
|
| //+------------------------------------------------------------------+
|
|
|
| //--- Do not remove!
|
| #property tester_everytick_calculate
|
| //---
|
| #property indicator_chart_window
|
| #property indicator_buffers 2
|
| #property indicator_plots 1
|
| //---
|
| #property indicator_type1 DRAW_LINE
|
| #property indicator_color1 clrOrange
|
| #property indicator_style1 STYLE_SOLID
|
| #property indicator_width1 2
|
| //---
|
| #property copyright "Copyright (C) 2026, boyvlad"
|
| #property link "https://www.mql5.com/en/users/boyvlad"
|
| //---
|
| #include "src\Indicator.mqh"
|
| #include "src\InputsAndRelated.mqh"
|
|
|
| CIndicator* Indicator; // root indicator object
|
|
|
| //+------------------------------------------------------------------+
|
| //| Custom indicator initialization function |
|
| //+------------------------------------------------------------------+
|
| int OnInit()
|
| {
|
| CIndiParams params;
|
| Indicator = new CIndicator(params);
|
| return INIT_SUCCEEDED;
|
| }
|
|
|
| //+------------------------------------------------------------------+
|
| //| Custom indicator iteration function |
|
| //+------------------------------------------------------------------+
|
| int OnCalculate(const int32_t rates_total,
|
| const int32_t prev_calculated,
|
| const datetime& time[],
|
| const double& open[],
|
| const double& high[],
|
| const double& low[],
|
| const double& close[],
|
| const long& tick_volume[],
|
| const long& volume[],
|
| const int32_t& spread[])
|
| {
|
| return Indicator.onCalculate(rates_total, prev_calculated, open, high, low, close, time);
|
| }
|
|
|
| //+------------------------------------------------------------------+
|
| //| Custom indicator deinitialization function |
|
| //+------------------------------------------------------------------+
|
| void OnDeinit(const int reason)
|
| {
|
| delete Indicator;
|
| }
|