Может Вы пришлете весь код исправленныйисправленный код в окошке выше. индикатор скачивал по вашей ссылке
#property show_inputs
Как всегда, отлично, но я бы хотел, чтобы вы внесли некоторые небольшие изменения.
//+------------------------------------------------------------------+
//| Num.mq4 |
//| Copyright 2022, AM2 |
//| https://www.forexsystems.biz |
//+------------------------------------------------------------------+
#property copyright "Copyright 2022, AM2"
#property link "https://www.forexsystems.biz"
#property version "1.00"
#property strict
#property indicator_chart_window
input int Num=2;
input string IndName="Number";
int num=Num;
datetime t=0;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
//--- indicator buffers mapping
//---
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
const int 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 int &spread[])
{
//---
int n=(int)iCustom(NULL,0,IndName,num,1);
if(n>0 && t!=time[0])
{
num++;
t=time[0];
}
Comment("\n Ind: ",n,
"\n Num: ",num);
//--- return value of prev_calculated for next call
return(rates_total);
}
//+------------------------------------------------------------------+
AM2