Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 -



    BertrandNinjaTrader Customer Service

    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 -

        BertrandNinjaTrader Customer Service

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

            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?

                BertrandNinjaTrader Customer Service

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

                    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 Javierw.ok, Today, 04:12 PM
                      0 responses
                      4 views
                      0 likes
                      Last Post Javierw.ok  
                      Started by timmbbo, Today, 08:59 AM
                      2 responses
                      10 views
                      0 likes
                      Last Post bltdavid  
                      Started by alifarahani, Today, 09:40 AM
                      6 responses
                      40 views
                      0 likes
                      Last Post alifarahani  
                      Started by Waxavi, Today, 02:10 AM
                      1 response
                      18 views
                      0 likes
                      Last Post NinjaTrader_LuisH  
                      Started by Kaledus, Today, 01:29 PM
                      5 responses
                      15 views
                      0 likes
                      Last Post NinjaTrader_Jesse  
                      Working...
                      X