How to 'flash' the log?

 

Hi,

I do some 'backtests' just with the bars of the current chart. Now it happens that I print more lines than the expert tab shows - ok.

But the logfile isn't flushed so a lot of lines (bytes) are still kept in the memory of mt4 until I close mt4.

Is there another option to flush the log (empty the mem) like flushing files by

FileFlush( hdl );

than the close of mt4?


I just realized a strange thing?

I have loop of around 1254 repetitions within an indicator. start() of that indicator runs once after installation or re-compilation from Bars to Zero: Kind of a simple backtest ;)

Now the log which can be seen and copied in the Expert tab has the repetitions no. 1060 - 1254. The log-file in \experts\log has the lines (before flush caused by closing the mt4) 1-823.


Isn't there a special character like "\t" for Tab to flush the log so I just put a (e.g.) Print("\@"); in my indicator..?

 
gooly:

Hi,

I do some 'backtests' just with the bars of the current chart. Now it happens that I print more lines than the expert tab shows - ok.

But the logfile isn't flushed so a lot of lines (bytes) are still kept in the memory of mt4 until I close mt4.

Is there another option to flush the log (empty the mem) like flushing files by

than the close of mt4?


I'm not sure what you are asking. I assume that you are talking about using the strategy tester?

If so, there is no "Experts tab", just the "journal"

If you want to clear the journal, click on the journal tab, right click in the journal window and click on "clear all journals"

 
GumRai:


I'm not sure what you are asking. I assume that you are talking about using the strategy tester?

If so, there is no "Experts tab", just the "journal"

If you want to clear the journal, click on the journal tab, right click in the journal window and click on "clear all journals"


No, I am not using the StrategyTester!

Within start()

I just have:

int nLimit = Bars;

for(n2=1;n2<15;n2++) { 
for(n3=0;n3<2;n3++) { 
for(n1=1;n1<20;n1++){ 
for(Shift=1;Shift<12;Shift++) {
 ... // some ini sets
   for(i=nLimit-50; i>0; i--) {  
   //for(i=1000; i>=0; i--) {  

...

   } // start
   Print("Loop result);
}}}}} // all the fors

Print("End");
return(0)
} // end start()

So each loop prints into the log.


OK, I can use files..

But to flush the log should not be impossible - or what?


 
gooly:

No, I am not using the StrategyTester!

Within start()

I just have:

So each loop prints into the log.


OK, I can use files..

But to flush the log should not be impossible - or what?

I read that the log is flushed when you open the file location from the journal pane . . . right click, Open. I think you just need to wait a little . . .
Reason: