Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error compiling indicator

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

    Error compiling indicator

    Hello,

    I got this error when I compiling my new indicator:

    ERROR: Unexpected preprocessor directive
    CODE: CS1028 - click for info
    Line: 473
    Column: 4

    In the line 473 I have #endregion on column 3

    If you need a screenshot of my code please let me know.

    Thanks,

    Alan

    #2
    What the directive is saying that it cannot match up the other side of the preprocessor direction, in this case it is a region.

    In your code you need to have:

    #region Some name you give it
    Your normal code
    #endregion

    So the #region, #endregion are like brackets typically used to "shrink" the look of code so you don't have to scroll through everything. Basically cosmetic in nature.

    The other option would be to delete or comment out the #endregion.

    Comment


      #3
      Hello Alan,

      Thank you for your post and thank you to Tasker-182.

      Yes, you would need to start the #region or comment out the #endregion.
      Cal H.NinjaTrader Customer Service

      Comment


        #4
        Thank you Tasker and Cal, I already comment out the #endregion and it worked like a charm...

        Happy Eastern!

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        585 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        340 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        554 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        552 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X