NexusFi: Find Your Edge


Home Menu

 





Forcing recalculation/redraw of a NinjaTrader chart


Discussion in NinjaTrader

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




 
Search this Thread

Forcing recalculation/redraw of a NinjaTrader chart

  #1 (permalink)
 wolf50us 
Sarasota + Florida/USA
 
Experience: Advanced
Platform: Ninja,tradestation,metatrader
Trading: Futures eminis
Posts: 6 since Sep 2014
Thanks Given: 2
Thanks Received: 0

I have an indicator that plots volume histograms from the session start time similar to dValueArea.

My indicator additionally allows sub session volume histograms to be triggered and displayed
within the session. I have done this by setting a boolean flag for a secondary session and
specifying a time stamp which specifies the time (bar) at which to start the sub session histogram.

By selecting the indicator's properties panel and setting the flag and time stamp and applying the changes
the chart will be redrawn with the child histograms in the specified places.

All of this works fine when using the indicator's property panel and applying the changes. My problem
is that I have added a simple toolstrip button to do the same thing. The button sets the boolean flag
and captures the desired bar.

My problem is that, unlike applying changes from the indicator's properties panel which apparently re-initializes
and redraws the chart, I get no changes when using the toolstrip button.

I have tried calling ChartControl.ChartPanel.Invalidate() and ChartControl.Refresh() from OnMarketUptate()
and within the button click routine to no avail.

I would greatly appreciate any advice that sheds light on the sequence of events that are triggered
when an indicator's properties are changed and how to initiate those changes programmatically.

Thanks in advance and I apologize if I am posting a redundant thread. I have not found the answer yet.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NexusFi Journal Challenge - April 2024
Feedback and Announcements
Are there any eval firms that allow you to sink to your …
Traders Hideout
Build trailing stop for micro index(s)
Psychology and Money Management
Futures True Range Report
The Elite Circle
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
 
  #3 (permalink)
 wolf50us 
Sarasota + Florida/USA
 
Experience: Advanced
Platform: Ninja,tradestation,metatrader
Trading: Futures eminis
Posts: 6 since Sep 2014
Thanks Given: 2
Thanks Received: 0


I found that by storing variables in the Properties Region that NinjaTrader would automatically serialize them for me. By simply changing where I stored my values everything worked due to the fact the changed values would be
serialized on the F5 event and then restored properly before the historical OnUpdates would be applied.

Started this thread Reply With Quote




Last Updated on June 17, 2015


© 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