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 NullPointStrategies, Today, 05:17 AM
      0 responses
      44 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      124 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      65 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      42 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X