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 CarlTrading, Yesterday, 11:51 AM
            0 responses
            18 views
            0 likes
            Last Post CarlTrading  
            Started by CarlTrading, Yesterday, 11:48 AM
            0 responses
            23 views
            0 likes
            Last Post CarlTrading  
            Started by CaptainJack, 03-25-2026, 09:53 PM
            0 responses
            27 views
            0 likes
            Last Post CaptainJack  
            Started by CaptainJack, 03-25-2026, 09:51 PM
            0 responses
            15 views
            0 likes
            Last Post CaptainJack  
            Started by Mindset, 03-23-2026, 11:13 AM
            0 responses
            22 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X