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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      87 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      132 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      65 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      118 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      67 views
      0 likes
      Last Post PaulMohn  
      Working...
      X