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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      65 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      149 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      99 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      286 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X