{"id":641,"date":"2007-07-14T15:41:02","date_gmt":"2007-07-14T15:41:02","guid":{"rendered":"http:\/\/www.amibroker.org\/userkb\/2007\/07\/14\/debugview-vs-interpretation-window\/"},"modified":"2007-07-16T10:41:27","modified_gmt":"2007-07-16T10:41:27","slug":"debugview-vs-interpretation-window","status":"publish","type":"post","link":"http:\/\/www.amibroker.org\/editable_userkb\/2007\/07\/14\/debugview-vs-interpretation-window\/","title":{"rendered":"DebugView vs. Interpretation Window"},"content":{"rendered":"

As pointed out in a comment to this series, the Interpretation Window can be a valid alternative to using DebugView. A few points to consider when choosing either method are listed below. <\/p>\n

DebugView<\/h3>\n

Debug information is routed to DebugView using this type of statement: <\/p>\n

<\/span><<\/span>p<\/span>><\/span>DBVOn <\/span>= <\/span>ParamToggle<\/span>(<\/span>"DebugView"<\/span>,<\/span>"OFF|ON"<\/span>,<\/span>0<\/span>); <\/span>\/\/ Controls all output  <p>if( DBVOn ) _TRACE(\"# BuyPrice =\"+NumToStr(BuyPrice,1.2));  <\/span><\/pre>\n

Any type of information that can be expressed in string format can be send to DebugView. A few DebugView features are: <\/p>\n

– A stand-alone program
\n– Display accumulates multi-pass information
\n– Output includes timing information
\n– Output can be manually or auto saved to a file
\n– Optional scrolling display
\n– Copy and paste to\/from clipboard
\n– History depth setting (#lines displayed)
\n– Filter\/Highlight wrt keywords
\n– Always on top
\n– Find
\n– Software Clear display
\n– Low overhead (depending on the number of _TRACE() statements used) <\/p>\n

Interpretation Window<\/h3>\n

Debug information is routed to the Interpretation Window using this type of statement: <\/p>\n

<\/span><<\/span>p<\/span>><\/span>BuyPrice <\/span>= <\/span>LastValue<\/span>(<\/span>C<\/span>);  <<\/span>p<\/span>>if(<\/span>Status<\/span>(<\/span>"Action"<\/span>) == <\/span>actionCommentary<\/span>)  \r<<\/span>p<\/span>>{  \r<<\/span>p<\/span>><\/span>\/\/ This code executes only when the Interpretation Window is open.  \r<\/span><<\/span>p<\/span>><\/span>printf<\/span>(<\/span>"Buy=%1.2f\\n"<\/span>, <\/span>BuyPrice<\/span>);  \r<<\/span>p<\/span>>}  <\/span><\/pre>\n

Some features offered by the Interpretation Window:<\/p>\n

– The Interpretation Window is optimized for Chart-Commentaries
\n– Only displays info for current pass
\n– No history
\n– Copy and paste to clipboard
\n– An open Interpretation Window adds one full execution cycle to the code. <\/p>\n

While not all pros and cons were covered it can be seen from the above listing that DebugView is designed for debugging while the Interpretation Window is not. <\/p>\n

When running complex real-time trading systems the additional pass through the AFL code may prove to be too costly in terms of execution speed. <\/p>\n

Further comments invited. <\/p>\n","protected":false},"excerpt":{"rendered":"

As pointed out in a comment to this series, the Interpretation Window can be a valid alternative to using DebugView. A few points to consider when choosing either method are listed below. DebugView Debug information is routed to DebugView using this type of statement: <p>DBVOn = ParamToggle("DebugView","OFF|ON",0); \/\/ Controls all output  <p>if( DBVOn ) _TRACE(“# BuyPrice =”+NumToStr(BuyPrice,1.2));   Any type of information that can be expressed in string […]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[63],"tags":[],"_links":{"self":[{"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/posts\/641"}],"collection":[{"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/comments?post=641"}],"version-history":[{"count":0,"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/posts\/641\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/media?parent=641"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/categories?post=641"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.amibroker.org\/editable_userkb\/wp-json\/wp\/v2\/tags?post=641"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}