MobinMQL/Indicators/Class/week-2-ind-3.mq5
2025-07-22 14:48:34 +03:00

45 lines
1 KiB
MQL5

string time_frame_name[5];
int OnInit()
{
time_frame_name[0] = "min_1";
time_frame_name[1] = "min_5";
time_frame_name[2] = "min_10";
time_frame_name[3] = "min_15";
time_frame_name[4] = "min_30";
//---
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 value of prev_calculated for next call
return(rates_total);
}
//+------------------------------------------------------------------+