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 lightsun47, Today, 03:51 PM
            0 responses
            4 views
            0 likes
            Last Post lightsun47  
            Started by 00nevest, Today, 02:27 PM
            1 response
            8 views
            0 likes
            Last Post 00nevest  
            Started by futtrader, 04-21-2024, 01:50 AM
            4 responses
            44 views
            0 likes
            Last Post futtrader  
            Started by Option Whisperer, Today, 09:55 AM
            1 response
            13 views
            0 likes
            Last Post bltdavid  
            Started by port119, Today, 02:43 PM
            0 responses
            9 views
            0 likes
            Last Post port119
            by port119
             
            Working...
            X