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 FrancisMorro, Today, 03:24 AM
            0 responses
            1 view
            0 likes
            Last Post FrancisMorro  
            Started by Segwin, 05-07-2018, 02:15 PM
            10 responses
            1,769 views
            0 likes
            Last Post Leafcutter  
            Started by Rapine Heihei, 04-23-2024, 07:51 PM
            2 responses
            30 views
            0 likes
            Last Post Max238
            by Max238
             
            Started by Shansen, 08-30-2019, 10:18 PM
            24 responses
            943 views
            0 likes
            Last Post spwizard  
            Started by Max238, Today, 01:28 AM
            0 responses
            10 views
            0 likes
            Last Post Max238
            by Max238
             
            Working...
            X