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.

    BertrandNinjaTrader Customer Service

    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?
        BertrandNinjaTrader Customer Service

        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)
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by ageeholdings, Today, 07:43 AM
            0 responses
            7 views
            0 likes
            Last Post ageeholdings  
            Started by pibrew, Today, 06:37 AM
            0 responses
            4 views
            0 likes
            Last Post pibrew
            by pibrew
             
            Started by rbeckmann05, Yesterday, 06:48 PM
            1 response
            14 views
            0 likes
            Last Post bltdavid  
            Started by llanqui, Today, 03:53 AM
            0 responses
            6 views
            0 likes
            Last Post llanqui
            by llanqui
             
            Started by burtoninlondon, Today, 12:38 AM
            0 responses
            12 views
            0 likes
            Last Post burtoninlondon  
            Working...
            X