Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Instantiating Chart Anchors in Class Constructor

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Instantiating Chart Anchors in Class Constructor

    Is there any reason why instantiating chart anchors in the class constructor of drawing tools, rather than in the OnStateChange() method would be a bad idea?

    I've developed dozens of drawing tools and have hundreds applied to some charts. Every 2 to 4 months some of them are corrupted when a property of unrelated drawing tools is changed. The corruption is occurring when the edit is applied. It is a difficult problem to track down. My question relates to different approaches that I'm trying to discover the cause of the problem.

    Thanks,
    Henry

    #2
    Hello henry_aclitus,

    Thank you for the post.

    I am not aware of any specific items that would relate to using the constructor for that however I don't know of any example of that to know if that works or not. You could certainly give it a try to see if it resolves the issue you are having.

    I would otherwise need more specific details here on the problem you are seeing, from the information given I am not sure what you are running into to know if moving where you defined the anchors is related or not.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks Jesse. I ended up making a different change to the susceptible drawing tools that might fix the issue. Good to know that there is no harm in moving the instantiation of the chart anchors to the class constructor though.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Barry Milan, Today, 10:35 PM
      1 response
      6 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by WeyldFalcon, 12-10-2020, 06:48 PM
      14 responses
      1,427 views
      0 likes
      Last Post Handclap0241  
      Started by DJ888, Yesterday, 06:09 PM
      2 responses
      9 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by jeronymite, 04-12-2024, 04:26 PM
      3 responses
      40 views
      0 likes
      Last Post jeronymite  
      Started by bill2023, Today, 08:51 AM
      2 responses
      16 views
      0 likes
      Last Post bill2023  
      Working...
      X