Те това по-скоро като скрипт може да се заформи, примерно:
Код:
//+------------------------------------------------------------------+
//| alba.mq4 |
//+------------------------------------------------------------------+
#property copyright "Copyright 2020, МегаКурец Software Corp."
#property version "1.00"
#property strict
#property script_show_inputs
input int bars=1000;
ENUM_TIMEFRAMES timeframe=PERIOD_CURRENT;
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
MqlRates the_rates[];
double length[];
ArrayResize(the_rates,bars);
ArrayResize(length,bars);
int copied=0;
while(copied!=bars && !IsStopped()) copied=CopyRates(_Symbol,timeframe,0,bars,the_rates);
for(int i=0; i<bars; i++) length[i]=the_rates[i].high-the_rates[i].low;
ArraySort(length);
int last_bar=bars-1;
string the_string=StringFormat("най-дълга: %g пинпоня",length[last_bar]/Point);
the_string+=StringFormat("\nнай-къса: %g пинпоня",length[0]/Point);
the_string+=StringFormat("\nсредно: %g - %g пинпоня",length[ArrayBsearch(length,0.382*length[last_bar])]/Point,length[ArrayBsearch(length,0.618*length[last_bar])]/Point);
Comment(the_string);
}
//+------------------------------------------------------------------+
И други статистики могат да се изкарат, те тука е Релевантната документация:
https://docs.mql4.com/function_indices