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 NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      62 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      134 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      75 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      45 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      50 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X