Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Question about indicator modification

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

    Question about indicator modification

    Can anyone give advice how to modify standard @SUM indicator? I need to add new plots, so that indicator values below 0 were colored one color and values above 0 colored with another color. That's it. I looked at the code but didn't understood how to do that.

    #2
    Hi Aleks1, welcome to our forums - you can just make yourself a copy of the study in the editor and then work calls to PlotColors in that would allow to change the color used conditionally.

    Comment


      #3
      Hi, Bertrand
      I tried to write something like that in SUM indicator and now tried code from your example with SMA indicator but in both cases I receive CS0103 error. Name "names of added plots here" is out of current context. What am I missing?

      Comment


        #4
        Aleks1, would you mind attaching the file you have so far so we could take a look?

        Comment


          #5
          I successfully compiled the indicator but when I add it to the chart and press OK - Ninja crashes.
          Attached it.
          Attached Files

          Comment


            #6
            I would expect so, you created a reference to the script itself basically. Just call in the regular SUM method for the values and it should be better.

            SUM(Period)

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            61 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            39 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            21 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            23 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            51 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X