_trace output appears on verify but not after baktest

_trace output appears when I use "verify afl" but not after I save and use backtest.

first lines of code

//_TRACE( "!CLEAR!" ); 
_TRACE("after clear");



after save and backtest

I have been using the trace quite a lot but this has just started. Apparently I have done something, but have no idea as to what.
Hope it is not too riculously easy to waste yout time.


Appears, if I use "send to analysis window" I then get the _trace output. I thought saving in the editor and then running analysis should do the same.


Send to analysis guarantees that you are actually using correct file in Analysis window.
If you did not send it, chances are that you had different file version active in Analysis therefore, you were running different code than you thought.

I was sure that as I did changes I saved the code, then went to the Analysis window (which was already open) and rerun the analysis and changes were showing up. Am I correct in thinking now that saving the code doesn't guarantee the new code is used in the open analysys window? Obiously if I removed/replaced code in the chart window it would then show there as well. Not sure what I was doing wrong nut now I know to use send to analysis it seems to be working.


No, your thinking is incorrect.

When you save the formula AND that formula is actually selected in Analysis already then it is used automatically.
What is more it works the other way round - you don't even need to press save button at all.
Analysis window knows which file is used and it automatically saves the file in the open AFL formula editor when you just press Scan/Explore/Backtest/Optimize in Analysis if there were any modifications done. This of course works ONLY if you use AmiBroker's built-in AFL Formula editor, not some external editor.

1 Like

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.