Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

indicator copy

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

    indicator copy

    Hello,

    I want to use the pivots indicator as basic calculation for a new indicator and so I save it with a new name to add in this new indicator some calculations and drawings. But when I do compile there appear the error messages:
    the namespace <global namespace> contains already a definition for HLCCalculationmode
    the namespace <global namespace> contains already a definition for PivotRange
    (my translations!)

    I have an idea what us the reason but what can I do for using the pivots indicator as described above with a new indicator-name?

    Thank you!
    Tony

    #2
    Hello tonynt,

    Thanks for your post.

    As the error messages advise there is already a definition for the two enums.

    You can edit the copied pivots and comment out the section where they are defined, starting bout line 470 for the standard Pivots indicator. The copied indicator will find the named enums in the global namespace.

    To clarify, these enums are in the global namespace and there can only be one named enum (or rather each enum must be uniquely named).

    Comment


      #3
      Hello,

      thank you for your reply. But when I comment them then the indicator will miss it, no? I do not understand this. Why is it there when one can comment it? Maybe my translation was not correct: I need the pivots indicators values (pivots) as they are. I just want to backcolor (with rectangles) between the pivot levels.

      Thank you!
      Tony

      Comment


        #4
        Hello tonynt,

        Thanks for your reply.

        There can only be one unique global enum and it is in the original pivots. When your copy runs it will find the same-named global enums and will work just fine with the local copy of the enums commented out.

        Alternatively, you can rename the enums in your copy and then rename all the references to them throughout the copied code in your copy.

        It is your choice as the programmer.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        619 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        359 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        562 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        566 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X