Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Wizard-generated ORB Strategy condition fails

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

    Wizard-generated ORB Strategy condition fails

    I'm creating a simple range breakout strategy using the Strategy Wizard. The code results are as follows:

    if (Close[0] > HiLoOfTimeRange(6, 30, 6, 50).TheHigh[0])
    {
    EnterLong(
    1, "");
    }

    but I get this message when compiling the first time:

    "NinjaTrader.Strategy.Strategy.CurrentDayOHL() " is a 'method', which is not valid given context.

    How can a Wizard-generated code have a compiling error? Any fix?

    #2
    Hi Billy,

    When you are compiling it compiles all your NinjaScripts and so any errors in any of your files will pop up. From the error message it is not coming from your strategy since your strategy is not using CurrentDayOHL(). What you want to do is open up any NinjaScript file in the editor and press F5 to compile. Then you can double click on the Red error line to bring up the file with the error. You will either need to fix the code or you could just try deleting that file to fix the problem. Finally go back to your strategy and you should be able to compile then.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Josh--Never encountered that issue before, but that makes sense. I think I know just where to look. Thanks for the tip!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      648 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      369 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      109 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      573 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      575 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X