Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Missing strategy on chart

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

    Missing strategy on chart

    Hello!

    I have duplicated a well-working strategy in Visual Studio, and I have renamed that. After that I _can_ still see the new strategy in the NinjaScript Editor well, but I cannot see that in the chart when I want to attach that new strategy to the chart. I also cannot see that strategy in the Strategy Analyzer. I can compile the new strategy without errors in the NinjaScript Editor.
    What is wrong?

    Please find the enclosed pictures. M1BrakeOutManaged is the new and missing source. M1BrakeOutUnmanaged is the well-working original.

    I would appreciate any help!
    Last edited by CodeMonkey; 10-27-2019, 04:54 AM.

    #2
    Sorry! I have found the issue. I have put the SetStopLoss and SetProfitTarget to the
    SetDefaults
    (
    ). As soon as I removed, it is available. I don't know why

    Based on the official
    NinjaTrader
    Guide I have put SetStopLoss and SetProfitTarget to the
    OnStateChange
    (
    ) if (State == State
    .Configure) section.

    So far so good...
    Last edited by CodeMonkey; 10-27-2019, 05:16 AM.

    Comment


      #3
      Hi, thanks for your post.

      The Log tab of the Control Center will contain error messages if your script has issues in the OnStateChanged method. If you have a script that compiles but does not show up in the menus it is almost always an initialization issue in OnStateChaged.

      Kind regards,

      -ChrisL

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      163 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      82 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      125 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      206 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      184 views
      0 likes
      Last Post CarlTrading  
      Working...
      X