Форум по трейдингу, автоматическим торговым системам и тестированию торговых стратегий
fxsaber, 2020.01.25 12:39
Il modo più comodo per scaricare la cronologia dei tick (eseguire il consulente nel terminale).
#property description "Закачивает тики через Тестер". sinput datetime inFromDate = D'2019.01.01'; // С какой даты закачать тики sinput bool inAllSymbols = false; // По всем символам (vero) или текущему (falso) #include <fxsaber\MultiTester\MTTester.mqh> // https://www.mql5.com/ru/code/26132 string PrevTesterSettings = NULL; string GetMyName( void ) { return(StringSubstr(MQLInfoString(MQL_PROGRAM_PATH), StringLen(TerminalInfoString(TERMINAL_DATA_PATH) + "\\MQL5\\Experts\\"))); } bool RunMe( const datetime FromDate, const bool AllSymbols = false ) { const string Str = "[Tester]" + "\nExpert=" + GetMyName() + "\nSymbol=" + _Symbol + "\nOptimization=" + (AllSymbols ? "3" : "0") + "\nModel=4" + "\nFromDate=" + TimeToString(FromDate, TIME_DATE) + "\nToDate=" + TimeToString(TimeCurrent(), TIME_DATE) + "\nForwardMode=0" + "\nProfitInPips=1" + "\nOptimizationCriterion=0" + "\nVisual=0"; return(MTTESTER::SetSettings2(Str) && MTTESTER::ClickStart()); } int OnInit() { bool Res = !MQLInfoInteger(MQL_TESTER) && EventSetTimer(1); if (Res = Res && MTTESTER::GetSettings(PrevTesterSettings)) if (!(Res = RunMe(inFromDate, inAllSymbols))) MTTESTER::SetSettings2(PrevTesterSettings); return(Res ? INIT_SUCCEEDED : INIT_FAILED); } void OnTimer() { if (MTTESTER::IsReady()) { MTTESTER::SetSettings2(PrevTesterSettings); if (inAllSymbols) MTTESTER::CloseNotChart(); ExpertRemove(); } }
Dopo di che, è possibile eseguire script nel terminale che lavorano con i tick, e non aspettare a lungo senza segni di vita.
Ti stai perdendo delle opportunità di trading:
- App di trading gratuite
- Oltre 8.000 segnali per il copy trading
- Notizie economiche per esplorare i mercati finanziari
Registrazione
Accedi
Accetti la politica del sito e le condizioni d’uso
Se non hai un account, registrati
Download all ticks of a symbol's history:
Scarica tutti i tick dal tuo broker per tutti i simboli del market watch. Scarica tutta la cronologia o fino a una data specifica nel passato, se disponibile.
Author: Lorentzos Roussos