//+------------------------------------------------------------------+ //| trend.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 = "GOOGL"; // Market symbol for analysis input datetime from_t = D'2024.04.01'; // Start of quotes analysis time interval input datetime to_t = D'2026.04.01'; // End of quotes analysis time interval input ENUM_TIMEFRAMES tf = PERIOD_D1; // Time frame //--- #include "EconometricsM.mqh" //--- void OnStart() { //--- quotes downloading double close[]; int n_rates = CopyClose(symbol, tf, from_t, to_t, close); Print("*******************************************************"); PrintFormat("Number of downloaded quotes for market symbol %s: %d", symbol, n_rates); Print("*******************************************************"); if(n_rates<2) return; //--- data preparation for regression ulong n=n_rates; vector y(n); matrix X(n,2); for(ulong i=0;i