Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Color MACD avg line

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

    Color MACD avg line

    Hi,
    Is there an example on how to color MACD avg line please?
    if (Rising(MACD(fast,slow,smooth).Avg))
    {
    then what....? I want it to color lime...
    }
    ..............
    Thank you very much.
    Regards, Art.

    #2
    Art, you generally want to follow this sample - http://www.ninjatrader.com/support/f...ead.php?t=3227

    For NT7 it would be this one below, as introduced the PlotColors series with this release -



    Comment


      #3
      Wasted the whole morning on this and got nothing so far, no Avg coloring except Ninja is hanging and looks lk lost all my work. Cannot start Ninja... Thank you very much. Is Ninja trying to teach us how to program on C#? Is this a big deal to create another sample?
      Is there MACD sample not SMA?

      This is what I'm wriing:

      Add(new Plot(Color.Yellow, "Macd"));
      //Add(new Plot(Color.Red, "Avg")); -- original

      Add(new Plot(new Pen(Color.Lime, 2), PlotStyle.Line, "AvgRising"));
      Add(new Plot(new Pen(Color.Red, 2), PlotStyle.Line, "AvgFalling"));
      Add(new Plot(new Pen(Color.Black, 2), PlotStyle.Line, "AvgNeutral"));

      Add(new Plot(new Pen(Color.Green, 3), PlotStyle.Bar, "HistTickUp"));
      Add(new Plot(new Pen(Color.Red, 3), PlotStyle.Bar, "HistTickDown"));

      Add(new Line(Color.Black, 0, "Zero line"));

      Followed by
      if (Rising(MACD(....).Avg))
      {
      RisingPlot.Set(1, MACD....)[1]);
      RisingPlot.Set(MACD(....)[0]);
      .....
      }

      And it does not work. Please help.
      Thanks.
      Last edited by Art09; 11-11-2010, 11:06 AM.

      Comment


        #4
        We would unfortunately not have a sample for each and every individual case - have you checked into the ready made scripts shared here? http://www.ninjatrader.com/support/f...ch=MACD&desc=1

        If you can attach the complete script you got now, we could give it a run here as well.

        To get started in the NinjaTrader indicator creation process we also offer those tutorials -

        Comment


          #5
          Hi,
          I received your script, thank you very much! It certainly does what i want but does not show the histogram. Is there a way to keep the histogram please?
          Thank you very much again.
          Regards, Art.

          Comment


            #6
            You're welcome - you would need to create another plot in the file and then feed the MACD().Diff values (the histogram) in it - http://www.ninjatrader-support.com/H...deV6/MACD.html

            Comment


              #7
              MACD Diff Histo color change?

              Is there available a MACD Diff Histogram that changes color? If the current Diff reading is less that the previous, color red. It the current Diff reading is >= the previous, color blue. I am new to Ninjatrader so I do not know how to code this. Thanks for any assistance.

              Comment


                #8
                I believe the MACD Up Dn from our sharing section would be what you're after?

                Comment


                  #9
                  Thanks but I am having trouble importing the indicator. The cs file is saved on my desktop inside a new folder. It says "No Items Match Your Search" (inside the folder) when I try to import... When I click on the folder on the desktop, the cs file is clearly there so why is it not being found when I try to import it???... Assistance appreciated.
                  Last edited by jtimpson; 01-18-2011, 10:51 AM.

                  Comment


                    #10
                    Please just download the posted zip file and then attempt to import the zip directly via the File > Utilities > Import NinjaScript command, that would be the recommended way to handle it.

                    Comment


                      #11
                      For some reason it wasn't finding the zip file on the desktop, but I deleted it and downloaded again and it worked this time. Thanks and have a nice day.

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                      0 responses
                      600 views
                      0 likes
                      Last Post Geovanny Suaza  
                      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                      0 responses
                      347 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by Mindset, 02-09-2026, 11:44 AM
                      0 responses
                      103 views
                      0 likes
                      Last Post Mindset
                      by Mindset
                       
                      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                      0 responses
                      558 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by RFrosty, 01-28-2026, 06:49 PM
                      0 responses
                      558 views
                      1 like
                      Last Post RFrosty
                      by RFrosty
                       
                      Working...
                      X