• 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 rickyblah12, Today, 01:01 PM
        0 responses
        8 views
        0 likes
        Last Post rickyblah12  
        Started by dadarara, Today, 12:18 PM
        0 responses
        8 views
        0 likes
        Last Post dadarara  
        Started by joemiller, Today, 07:33 AM
        2 responses
        12 views
        0 likes
        Last Post joemiller  
        Started by TheGameOfProbabilities, 07-18-2019, 06:56 AM
        7 responses
        38 views
        0 likes
        Last Post DaveS
        by DaveS
         
        Started by claxxical, Yesterday, 10:00 PM
        0 responses
        13 views
        0 likes
        Last Post claxxical  
        Working...
        X