You can see comment in visual back test mode. If you don't (or the EA does not show it in visual back test) then it is prevented by the code (usually the line preventing comments in back testing mode looks something like this : if (!IsTesting()) Comment("");).
Only in "regular" back test it is prevented since in that case there is no active visible chart to which the back tested EA is attached
Why don't comments show up in backtest?? It would be nice to see values as the backtest runs! Dave
PS: tested this very simple EA and it shows comment in visual mode :
int deinit() { return (0); }
int start()
{
Comment("Time is : "+TimeToStr(TimeLocal(),TIME_DATE|TIME_SECONDS));
return (0);
}PS: this is the whole code.
________________________
If you wish it to be redirected into log file (in which case you can see what was "commented" in the log file) replace the "Comment" with "Print" but I do not recommend it since your log file will be huge (if you use comment on each tick print will do that same on each tick but will be adding a new line on each tick)
Interesting that yours works and mine only works during live trading?? Dave
PS: tested this very simple EA and it shows comment in visual mode :
int deinit() { return (0); }
int start()
{
Comment("Time is : "+TimeToStr(TimeLocal(),TIME_DATE|TIME_SECONDS));
return (0);
}PS: this is the whole code.
________________________
If you wish it to be redirected into log file (in which case you can see what was "commented" in the log file) replace the "Comment" with "Print" but I do not recommend it since your log file will be huge (if you use comment on each tick print will do that same on each tick but will be adding a new line on each tick)As you can see, the example code from that post does not have any conditions (ifs). Maybe some of the conditions in the code is preventing the comment part from being executed.
Also, they are saying that it can accept maximum 64 parameters but I doubt that it is the problem you have (compiler should warn you then).
Thought for a second that you might have a problem with the length of the comment string, but did not find such a limitation that would prevent you from seeing the comment (see the example : the line written there is written bu "Comment" and obviously it can handle very long strings too) so it seems that only some "if" block can be "responsible" to what happens to your EA
Interesting that yours works and mine only works during live trading?? Dave
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Why don't comments show up in backtest?? It would be nice to see values as the backtest runs!
Dave