evolution2/Evolution.mq5
Vladislav Boyko cd50d18f99 style: align pointer and reference symbols with type
In modern C++ and OOP practices, pointer and reference qualifiers are treated as an intrinsic part of the data type rather than the variable name. Aligning these symbols with the type reinforces this semantic distinction, improving conceptual clarity and consistency with modern conventions.
2026-08-28 12:32:39 -07:00

60 lines
2.1 KiB
MQL5

//+------------------------------------------------------------------+
//| 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 indicator_label1 "SMA"
//---
#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;
}