Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error in generate indicator

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

    Error in generate indicator

    I have programming errors in generate any indicators today. Would anyone take a look at my attached file ?

    Thanks
    Attached Files

    #2
    Hi Winnie, have you doubleclicked on the errors listed on the bottom? This will take you directly to the offending code line. Please post or attach the full code if you want us to take a look, the snippet you posted looks good.

    Comment


      #3
      Thanks for your help. I just open the indicator - DM which is already written in Ninjatrader program. I press F5 and the error occurs. This error occurs at every program which included those programs which was already in NinjaTrader.

      The error code is CS1040,CS1028 and CS0116.

      Comment


        #4
        Winnie, not sure I follow - every programming error in all your files will always be listed at the bottom of your NinjaScript editor, regardless of which file you compile. NinjaTrader compiles all your script into one file, so none of them can have programming errors for the compile to complete successfully. If you click on those errors it will directly take you to the portion in your script where the error was found, also other ones than the just opened one. If you dont't want to debug them, just comment them out and compile again.

        Comment


          #5
          Thanks ! I have solved the problem. You are very helpful. In addition, is the code High[0] means current bar high ?.

          Comment


            #6
            You're welcome - correct, but you need to consider the CalculateOnBarClose setting in realtime use - http://www.ninjatrader-support.com/H...BarClose1.html

            Comment


              #7
              understood , thank !

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by argusthome, 03-08-2026, 10:06 AM
              0 responses
              83 views
              0 likes
              Last Post argusthome  
              Started by NabilKhattabi, 03-06-2026, 11:18 AM
              0 responses
              47 views
              0 likes
              Last Post NabilKhattabi  
              Started by Deep42, 03-06-2026, 12:28 AM
              0 responses
              29 views
              0 likes
              Last Post Deep42
              by Deep42
               
              Started by TheRealMorford, 03-05-2026, 06:15 PM
              0 responses
              32 views
              0 likes
              Last Post TheRealMorford  
              Started by Mindset, 02-28-2026, 06:16 AM
              0 responses
              66 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Working...
              X