//+------------------------------------------------------------------+ //| vol2.mq5 | //| Copyright 2000-2026, MetaQuotes Ltd. | //| www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2000-2026, MetaQuotes Ltd." #property link "https://www.mql5.com" //--- #property script_show_inputs //--- input string symbol = "EURCHF"; // Market symbol for analysis input datetime from_t = D'2024.09.20'; // Start of analysis time interval input datetime to_t = D'2026.09.20'; // End of analysis time interval input ulong pfit = 3; // Fitted p for model testing input ulong qfit = 3; // Fitted q for model testing //--- #include "EconometricsM.mqh" //--- void OnStart() { //--- quotes downloading MqlRates rates[]; int n_rates = CopyRates(symbol, PERIOD_D1, from_t, to_t, rates); PrintFormat("Number of downloaded quotes for market symbol %s: %d", symbol, n_rates); if(n_rates < 2) return; //--- y calculation ulong n=(ulong)n_rates; vector y(n); for(ulong i=0;i