Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Editing an existing indicator.

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

    Editing an existing indicator.

    Hi, wanted to make a custom version of Pivots indicator, but I get this error:
    FloorPivots.cs The namespace '<global namespace>' already contains a definition for 'HLCCalculationMode' CS0101 477
    FloorPivots.cs The namespace '<global namespace>' already contains a definition for 'PivotRange' CS0101 485 13
    I've made a copy of Pivots indicator using Save as... in the Script Editor, and only change the formula, nothing more.

    How can I get this compiled?

    Thanks in advance.

    #2
    Hello chinook77,

    Thanks for your post.

    There are two approaches you can take here.

    If you do not intend to share this indicator then the simple answer is to delete (or comment out) lines 476 - 490. What you are deleting are public enums that have already been created/defined in the original pivots indicator file. As they are created in the indicator namespace, they are already available to any indicator that uses them and this is why you get the error messages (indicating they are already defined).

    If you intend to share your indicator, then you would need to rename the enums, for example from public enum HLCCalculationMode to something like public enum myHLCCalculationMode. You would then have to go through the script and replace every instance of HLCCalculationMode with the new myHLCCalculationMode

    Comment


      #3
      Solved, thank you for the quick replay.

      Best regards.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      574 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      332 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      553 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      551 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X