• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 sergey_z, Today, 05:44 AM
        0 responses
        2 views
        0 likes
        Last Post sergey_z  
        Started by NinjaCustomer, Today, 12:29 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_ChrisSch  
        Started by ronaldgreene828, Yesterday, 07:50 PM
        1 response
        15 views
        0 likes
        Last Post NinjaTrader_EricB  
        Started by nailz420, 07-17-2019, 08:38 AM
        2 responses
        14 views
        0 likes
        Last Post nailz420  
        Started by bouncetherubble, Yesterday, 06:56 PM
        0 responses
        9 views
        0 likes
        Last Post bouncetherubble  
        Working...
        X