I need some way to detect from code when the tester has the first pass and the last pass.
I tryed read from the log in tester/logs... unsuccessfully, I couldn´t open this log beacuse is used by terminal.exe.
Y was thinking reading the journal tester message but it will be so much work.
Any idea?
Thanks.
Yes, I was thinking about this; but how can I know the number of passes without a previous optimization.
I am using GlobalVariables for get the best set in my opinion with a private algorithm, my intention is when the optimization finished send me a mail with the information.
You cannot send mail from the tester last time I checked. Perhaps saving to file and having an expert_advisor read that file and email you the results will work for you. If you choose to use this route then filewritehistory() might be more helpful than just filewrite() because both live and tester can access that folder.
extern int iOptimization=1; int iDeInit_Count=0; void init(){} void start(){} void deinit(){ iDeInit_Count++; if(IsOptimization()==false)return; int H=FileOpen("iOptimization.csv",FILE_CSV|FILE_READ|FILE_WRITE,','); FileWrite(H,"iDeInit_Count="+iDeInit_Count+",iOptimization="+iOptimization); }Output to File:
Deinit is run each pass. My posted code depends on it.
Yes, I have a counter for every deinit()
Yes, I have a counter for every deinit()
extern int iOptimization=1; void init(){} void start(){} void deinit(){ int Cnt=GlobalVariableGet("iDeInit_Count"); Cnt++; GlobalVariableSet("iDeInit_Count",Cnt); }
You don't need to ... de_initialization is ran only once when the optimization finishes.
You cannot send mail from the tester last time I checked. Perhaps saving to file and having an expert_advisor read that file and email you the results will work for you. If you choose to use this route then filewritehistory() might be more helpful than just filewrite() because both live and tester can access that folder.
Output to File:
You can send mail with a extern dll.
I don´t understand how you get that output to file.
iOptimization in your code don´t change his value and must be 1 and iDeInit_Count = 1 is normal because this variable is destroyed in every init();
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I need some way to detect from code when the tester has the first pass and the last pass.
I tryed read from the log in tester/logs... unsuccessfully, I couldn´t open this log beacuse is used by terminal.exe.
Y was thinking reading the journal tester message but it will be so much work.
Any idea?
Thanks.