NexusFi: Find Your Edge


Home Menu

 





ToolBar Button Reload Crash


Discussion in NinjaTrader

Updated
    1. trending_up 1,222 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 0 posts
    2. attach_file 2 attachments




 
Search this Thread

ToolBar Button Reload Crash

  #1 (permalink)
 
tshunhu's Avatar
 tshunhu 
Wuhan, Hubei, China
 
Experience: Beginner
Platform: NinjaTrader
Broker: Interactive Broker
Trading: Stocks
Posts: 272 since Jun 2014
Thanks Given: 306
Thanks Received: 165

Hello!

I've encountered some difficulties when programming indicators in NT7,

Thanks to many threads that talk about adding button to the toolbar of NT7, I succeeded in putting my own diy buttons. The purpose of these buttons is to provide a simple way to display and hide indicators in the chart.

For example, I progammed a indicator to show the bar number since the begin of a session. Once the button is clicked, the numbers display on the chart can be hidden or display.

I achieve this function by calling ChartControl.Indicators to display/add/remove indicators. Normally, the button works fine. BUT, when the indicator is loaded and displayed on the chart, then using Ctrl+Shift+F5 to reload history data will certainly cause a crash of the whole NT program.
  • If add indicator manually from the NT indicators window, a reload will not cause any problem
  • If the indicator is hidden by clicking the button, a reload cause no problem

The bug must be in the button indicator, could any one help me find out reason, OR is there another to achieve the same result? Thank you!

Please find my code in attached files

Aaron_BarNumber.cs

_Show_BarNumber.cs

Follow me on Twitter Visit my NexusFi Trade Journal Started this thread Reply With Quote




Last Updated on March 7, 2016


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts