Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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
      Chris L.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by rocketman7, Today, 01:00 AM
      0 responses
      1 view
      0 likes
      Last Post rocketman7  
      Started by wzgy0920, 04-20-2024, 06:09 PM
      2 responses
      27 views
      0 likes
      Last Post wzgy0920  
      Started by wzgy0920, 02-22-2024, 01:11 AM
      5 responses
      32 views
      0 likes
      Last Post wzgy0920  
      Started by wzgy0920, 04-23-2024, 09:53 PM
      2 responses
      74 views
      0 likes
      Last Post wzgy0920  
      Started by Kensonprib, 04-28-2021, 10:11 AM
      5 responses
      193 views
      0 likes
      Last Post Hasadafa  
      Working...
      X