Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

UserControlCollection different when enabling strategy from ControlCentre

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

    UserControlCollection different when enabling strategy from ControlCentre

    Hi,
    I have a strategy which places a corporate logo on the chart, by placing a control in the UserControlCollection. This works just fine when the strategy is enabled from the chart's Strategy dialogue window, or by pressing F5 to reload the chart.
    If, however, the strategy is currently not enabled and the checkbox to enable it is clicked in the Strategies tab of the Control Centre, the logo is not visible. Note this is the same strategy, still running on a chart, but just its Enable property set from a different location. It is as if the UserControlCollection is not the same one if the strategy is Enabled on the Control Centre.
    I even wrote some code to wait until the chart window is active, and THEN putting the logo on, but there was no improvement - it is still missing if the original enabling occurred from the Control Centre.

    Thoughts?
    Thanks.
    saltminer

    #2
    Hello saltminer,

    Thanks for your post.

    I'll attach an example from the NT user apps that adds controls to user control collection. Testing here the buttons appear when enabled from the control center (after the strategy was initially loaded on the chart). Please test to see if you see the same on your end.



    Please note: The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

    Comment


      #3
      Hi,
      thanks - I moved the code to State.Historical (which is a far more sensible place for it to be) and that solved the issue.

      saltminer

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      88 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      135 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      119 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      69 views
      0 likes
      Last Post PaulMohn  
      Working...
      X