2026-02-20 15:09:43 -08:00
|
|
|
//+------------------------------------------------------------------+
|
|
|
|
|
//| Copyright (C) 2026, boyvlad |
|
|
|
|
|
//| https://www.mql5.com/en/users/boyvlad |
|
|
|
|
|
//+------------------------------------------------------------------+
|
2026-02-22 14:50:35 -08:00
|
|
|
|
|
|
|
|
//--- Do not remove!
|
|
|
|
|
#property tester_everytick_calculate
|
|
|
|
|
//---
|
2026-02-20 15:09:43 -08:00
|
|
|
#property indicator_chart_window
|
2026-05-11 14:01:41 -07:00
|
|
|
#property indicator_buffers 2
|
2026-02-20 15:09:43 -08:00
|
|
|
#property indicator_plots 1
|
|
|
|
|
//---
|
|
|
|
|
#property indicator_type1 DRAW_LINE
|
|
|
|
|
#property indicator_color1 clrOrange
|
|
|
|
|
#property indicator_style1 STYLE_SOLID
|
|
|
|
|
#property indicator_width1 2
|
2026-05-11 14:01:41 -07:00
|
|
|
#property indicator_label1 "SMA"
|
2026-02-20 15:09:43 -08:00
|
|
|
//---
|
|
|
|
|
#property copyright "Copyright (C) 2026, boyvlad"
|
|
|
|
|
#property link "https://www.mql5.com/en/users/boyvlad"
|
2026-03-01 13:38:57 -08:00
|
|
|
//---
|
2026-03-09 22:55:44 -07:00
|
|
|
#include "src\Indicator.mqh"
|
2026-03-17 02:13:18 -07:00
|
|
|
#include "src\InputsAndRelated.mqh"
|
2026-02-20 15:09:43 -08:00
|
|
|
|
2026-03-09 22:55:44 -07:00
|
|
|
CIndicator* Indicator;
|
2026-02-20 15:09:43 -08:00
|
|
|
|
|
|
|
|
int OnInit()
|
|
|
|
|
{
|
2026-03-17 02:13:18 -07:00
|
|
|
CIndiParams params;
|
|
|
|
|
Indicator = new CIndicator(params);
|
2026-02-20 15:09:43 -08:00
|
|
|
return INIT_SUCCEEDED;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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[])
|
|
|
|
|
{
|
2026-03-09 22:55:44 -07:00
|
|
|
return Indicator.onCalculate(rates_total, prev_calculated, open, high, low, close, time);
|
2026-02-20 15:09:43 -08:00
|
|
|
}
|
|
|
|
|
|
2026-03-01 13:38:57 -08:00
|
|
|
void OnDeinit(const int reason)
|
2026-02-20 15:09:43 -08:00
|
|
|
{
|
2026-03-09 22:55:44 -07:00
|
|
|
delete Indicator;
|
2026-02-20 15:09:43 -08:00
|
|
|
}
|