Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy disappears

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

    Strategy disappears

    Hello,

    there are situations possible where a Strategy disappears from the list of available strategies, which I can put on a chart (Ctrl-S).

    I have not identified why this happens.

    Does anyone has recognized a smilar behaviour of NinjaTrader? I am not sure if the reason is found in the code of the strategy.

    Best regards
    Gerik

    #2
    Hello Gerik,

    Thanks for your post.

    If a strategy has a significant run time type error, that cannot be found in the compilation process but would likely relate to an issue in the OnStateChange() method, the system will remove a strategy from the selection window to prevent a severe error.

    Please check the "log" tab for any error messages, this is always a good first place to check when something unusual is occuring.

    Other reasons could relate to possible changes being made in strategy and not checking that the following are not the same in a strategy:
    1) The strategy file name (this is what the Ninjascript editor uses)
    2) The strategy class name
    3) the strategy Name = field in the OnStateChange() method (this is what the strategy selector uses)

    Ideally all three will have the same name.

    So it is possible that you may have done a "save as" of a strategy you wanted to change but did not change the name = field so when the strategies list is loaded it will only show 1 of the two strategies with the same name. This could be the case if you can see the strategies in the Ninjascript editor but not in the strategy dropdown list.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    165 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    87 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    128 views
    0 likes
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    207 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    185 views
    0 likes
    Last Post CarlTrading  
    Working...
    X