{"id":3117,"date":"2019-03-01T19:29:09","date_gmt":"2019-03-01T19:29:09","guid":{"rendered":"https:\/\/puvox.software\/blog\/?p=3117"},"modified":"2021-11-14T13:45:48","modified_gmt":"2021-11-14T13:45:48","slug":"chart-debugger-window-printbox-for-ninjatrader","status":"publish","type":"post","link":"https:\/\/puvox.software\/blog\/chart-debugger-window-printbox-for-ninjatrader\/","title":{"rendered":"Chart Debugger Window (PrintBox, like DataBox) for NinjaTrader"},"content":{"rendered":"<div class=\"default-content-clss content_3117 type_post \">\n<p>For the reason that NinjaTrader is really excellent, we wanted to share a helper debugger tool which will facilitate debugging in NinjaTrader.<\/p>\n<p>From this moment, use&nbsp;<strong><code>&nbsp;Print<span style=\"color: #993300;\">Box&nbsp;<\/span><\/code><\/strong>&nbsp;function instead of the poorer&nbsp;<strong><code>&nbsp;Print&nbsp;<\/code><\/strong>&nbsp;function:<\/p>\n<pre>protected override void OnBarUpdate()<br>{<br>&nbsp; &nbsp; ...<br>&nbsp; &nbsp; PrintBox(  \"Hello World\" );<br>&nbsp; &nbsp; PrintBox( 123 );<br>&nbsp; &nbsp; PrintBox( Time[0] );<br>&nbsp; &nbsp; PrintBox( Close[0]-Open[0] );<br>&nbsp; &nbsp; PrintBox( myObject );<br>&nbsp; &nbsp; ...<br>}<\/pre>\n<p>And to see the results for any bar, just <strong><code>Shift+Click<\/code><\/strong>&nbsp;(holding <strong>Shift<\/strong> on keyobard, and clicking mouse) onto any bar, you will see a DataBox&nbsp; window:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img fetchpriority=\"high\" decoding=\"async\" width=\"564\" height=\"438\" src=\"https:\/\/puvox.software\/blog\/wp-content\/uploads\/sites\/2\/2019\/03\/PrintBox-debugger-window.png\" alt=\"\" class=\"wp-image-3118\" srcset=\"https:\/\/puvox.software\/blog\/wp-content\/uploads\/sites\/2\/2019\/03\/PrintBox-debugger-window.png 564w, https:\/\/puvox.software\/blog\/wp-content\/uploads\/sites\/2\/2019\/03\/PrintBox-debugger-window-300x233.png 300w, https:\/\/puvox.software\/blog\/wp-content\/uploads\/sites\/2\/2019\/03\/PrintBox-debugger-window-400x311.png 400w\" sizes=\"(max-width: 564px) 100vw, 564px\" \/><\/figure>\n\n\n\n<p>As you see, it will also include automatically:<\/p>\n<ul>\n<li>Time of the bar ( &amp; Date)<\/li>\n<li>BarNumber<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>What&#8217;s more, it also supports multiple-timeframe dataseries&nbsp; i.e. if you use <code>AddDateSeries(Minute, 1)<\/code>&nbsp;and it will also print them in that box (which happened during that <strong>Primary Bar<\/strong> lifetime). For example, when <strong>Primary Bar timeframe<\/strong> is 10 minute, and secondary timeframe is <strong>1 minute<\/strong>:<\/p>\n<p>at 08:40:00 bar (which lasted 10 minute) you have:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" width=\"384\" height=\"398\" src=\"https:\/\/puvox.software\/blog\/wp-content\/uploads\/sites\/2\/2019\/03\/debug-window-for-secondary-tiemframe.png\" alt=\"\" class=\"wp-image-3134\" srcset=\"https:\/\/puvox.software\/blog\/wp-content\/uploads\/sites\/2\/2019\/03\/debug-window-for-secondary-tiemframe.png 384w, https:\/\/puvox.software\/blog\/wp-content\/uploads\/sites\/2\/2019\/03\/debug-window-for-secondary-tiemframe-289x300.png 289w\" sizes=\"(max-width: 384px) 100vw, 384px\" \/><\/figure>\n\n\n\n<p style=\"font-size: 12px; text-align: right;\"><em>(as a side-note, if you use\u00a0 MultiTimeframe series in your scripts, <br \/>I highly recommend to read about the glitches in\u00a0<a href=\"https:\/\/puvox.software\/blog\/ninjatrader-multi-timeframe-bevahior-in-realtime-vs-historical\/\">this post<\/a> )<\/em><\/p>\n<p>\u00a0<\/p>\n<p>So, I hope that will help development\/debugging of NinjaTrader indicators and strategies, and will help other programmers too.\u00a0<\/p>\n<p><strong><a href=\"https:\/\/bitbucket.org\/puvox\/printbox-debugger-window\/get\/a4f0f31e4136.zip\">Download Addon here<\/a><\/strong><\/p>\n<p>p.s. (After downloading, put the folder in .ZIP and import in NT)<\/p>\n<p>p.s.2. You might find <a href=\"https:\/\/puvox.software\/blog\/ninjatrader-time-measurement-debugger-for-methods\/\">this tool<\/a> also useful.<\/p>\n<p>Let us know your feedback.\u00a0<br \/>T.<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<div class=\"default-content-clss excerpt_3117 type_post \"><p>For the reason that NinjaTrader is really excellent, we wanted to share a helper debugger tool which will facilitate debugging in NinjaTrader. From this moment, use&nbsp;&nbsp;PrintBox&nbsp;&nbsp;function instead of the poorer&nbsp;&nbsp;Print&nbsp;&nbsp;function:<a class=\"excerpt-read-more\" href=\"https:\/\/puvox.software\/blog\/chart-debugger-window-printbox-for-ninjatrader\/\">(Continue Reading)<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":3118,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[9],"tags":[],"class_list":["post-3117","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-trading-programming"],"_links":{"self":[{"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/posts\/3117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/comments?post=3117"}],"version-history":[{"count":0,"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/posts\/3117\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/media\/3118"}],"wp:attachment":[{"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/media?parent=3117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/categories?post=3117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/puvox.software\/blog\/wp-json\/wp\/v2\/tags?post=3117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}