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 salination2, Yesterday, 07:21 PM
            1 response
            4 views
            0 likes
            Last Post s.kinra
            by s.kinra
             
            Started by aarons34, Yesterday, 08:11 PM
            0 responses
            6 views
            0 likes
            Last Post aarons34  
            Started by Shiner452, Yesterday, 06:55 PM
            0 responses
            2 views
            0 likes
            Last Post Shiner452  
            Started by Aquatrade, Yesterday, 06:22 PM
            0 responses
            3 views
            0 likes
            Last Post Aquatrade  
            Started by trader3000a, Yesterday, 02:04 PM
            2 responses
            24 views
            0 likes
            Last Post trader3000a  
            Working...
            X