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 thread, Yesterday, 11:58 PM
      0 responses
      1 view
      0 likes
      Last Post thread
      by thread
       
      Started by jclose, Yesterday, 09:37 PM
      0 responses
      6 views
      0 likes
      Last Post jclose
      by jclose
       
      Started by WeyldFalcon, 08-07-2020, 06:13 AM
      10 responses
      1,414 views
      0 likes
      Last Post Traderontheroad  
      Started by firefoxforum12, Yesterday, 08:53 PM
      0 responses
      11 views
      0 likes
      Last Post firefoxforum12  
      Started by stafe, Yesterday, 08:34 PM
      0 responses
      11 views
      0 likes
      Last Post stafe
      by stafe
       
      Working...
      X