Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SMAOverUnderPaintBar

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

    SMAOverUnderPaintBar

    I downloaded this indicator and really like it but I am trying to get it to only paint up bars above or down bars below. I would like for down bars above and up bars below to be neutral bars.

    It has: if (close[0] > SMAvg[0])

    I'm trying to add: Open[0] > SMAvg[0] & Open[0] < Close[0]

    I have searched all thru the site and can't find what I need to make it happen. Any help would be greatly appreciated.
    Thanks,
    Bryan Griggs
    [email protected]

    #2
    Hello BryanGriggs,
    Welcome to the forum and I am happy to assist you.

    Seems you missed a &. The correct code will be,

    Code:
    if (Open[0] > SMAvg[0] && Open[0] < Close[0])
    {
       //do something
    }
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Sometimes you just have to walk away. First Joydeep I'd like to say Thank You so much for your help and reply. Second I want to say NinjaTrader is the BEST! Second to none! I had put in the "&" but realized this morning that I was saving everytime and not compiling. Daaaaaa! I'm gonna work to make this indicator better (in my opinion). Here you can see a screen shot from just this mornings session that shows the possobilites. Thanks again Joydeep and I'll keep you posted.
      Bryan
      Last edited by BryanGriggs; 09-28-2012, 08:33 AM.

      Comment


        #4
        Hello BryanGriggs,
        Thanks for your note.

        Please let me know if I can assist you any further.
        JoydeepNinjaTrader Customer Service

        Comment


          #5
          With Neutral Bars

          I have attached a modified file of the SMAOverUnderPaintBar. I renamed it as PriceOverUnderMAPaintBar. Go to chart data settings and make the color for bars up and down the same color. This will be your Neutral color. If the bar closes over your MA and is an up bar, it will be painted green. If it closes above your MA but is a down bar, it will not be painted and will show as your selected Neutral color. I am still working on this in my spare time and would like the indicator to allow for different MA options as well as be able to select Up/Down bar colors. Any help would be great and I will Update when complete but may be a while.
          Thanks
          Attached Files

          Comment


            #6
            Hello BryanGriggs,
            Please add additional plot values using the Add() method to plot multiple MA.
            http://www.ninjatrader.com/support/h...x.html?add.htm

            To create user defined inputs please refer to this post
            http://ninjatrader.com/support/forum...ead.php?t=5782

            To create user defined inputs for coloring the bars please refer to this post which further illustrates it
            http://ninjatrader.com/support/forum...ead.php?t=4977
            JoydeepNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by fredrikn, 05-08-2019, 04:01 AM
            57 responses
            4,389 views
            2 likes
            Last Post Momentum  
            Started by Blairski, Yesterday, 09:19 AM
            2 responses
            11 views
            0 likes
            Last Post Blairski  
            Started by tonynt, Today, 09:33 AM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by minotti1, Today, 08:31 AM
            1 response
            13 views
            0 likes
            Last Post NinjaTrader_Jim  
            Started by SmartArtsStudio, 05-15-2021, 10:46 AM
            1 response
            15 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Working...
            X