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

Heiken Ashi Smoothed - Please Help Me!

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

    Heiken Ashi Smoothed - Please Help Me!

    Can anyone please help me? I am trying to figure out how the have an indicator that works on NT 7 that will do the following:

    Color a normal candlestick whatever the color is of the Heiken Ashi Smoothed.

    I want to keep my charts clean and would like the indicator to reference the Heiken Ashi Smoothed (set to my custom settings of 6 smoothed and 2 weighted) and color the candlestick the same color as what the Heiken Ashi Smoothed is, but I don't want to see the Heiken Ashi Smoothed.

    Anyone know how to do this? I found an indicator on Great Trading Systems.com, but it is coded for NT 6.5 and when I try and import into NT 7 it fails.

    Thanks,
    Scott Perry

    #2
    Hello Scott,

    Thank you for your post.

    You can call the Heiken Ashi's indicator method from within your NinjaScript code to access the values without plotting the Heiken Ashi. For information on the HeikenAshi() method please visit the following link: http://www.ninjatrader.com/support/h...eiken_ashi.htm

    Please let me know if I may be of further assistance.

    Comment


      #3
      Would anyone be willing to help me? I need some minor indicator programming done. I can explain if someone is able to help. I'm needing to reference an indicator for the price bar to color the same color as the indicator. Your help would be greatly appreciated.

      Thanks,
      Last edited by NinjaTrader_Matthew; 05-23-2013, 01:05 PM.

      Comment


        #4
        Originally posted by dsperry View Post
        Would anyone be willing to help me? I need some minor indicator programming done. I can explain if someone is able to help. I'm needing to reference an indicator for the price bar to color the same color as the indicator. Your help would be greatly appreciated.

        Thanks,
        I'm not sure what you are doing exactly, can you explain further?

        I brought up a ES chart, added Heiken Ashi, there is no option for smoothed, but the bar colors do change based on what you tell it to be. (color for up/color for down).

        Is this a custom Heiken Ashi or the NT supplied one?
        Is this in 6.5 or 7?

        "I want to keep my charts clean and would like the indicator to reference the Heiken Ashi Smoothed (set to my custom settings of 6 smoothed and 2 weighted) and color the candlestick the same color as what the Heiken Ashi Smoothed is, but I don't want to see the Heiken Ashi Smoothed."

        Comment


          #5
          Would anyone be willing to help me? I need some minor indicator programming done. I can explain if someone is able to help. I'm needing to reference an indicator for the price bar to color the same color as the indicator. Your help would be greatly appreciated.
          Hi Scott

          I recently coded up my own indicator to do (almost) precisely what I think you're looking to achieve. I don't have the HA Smoothed so this is based on the standard Ninja HA indicator.

          The only difference between this and what you may be looking for is that this only gives the HA up color if the bar itself is an up bar (likewise for down bars) as in my opinion, you'll only want to go, say, long on an up bar. I can alter this if you wish. If you have any questions, please let me know.

          This works a treat - as you have the best of best worlds, as it were.

          I think this kind of thing works best using range bars, which is where this seems to be most effective.

          The colors are, of course, arbitrary. Just create a new indicator (no variables are needed) and put the code below in the OnBarUpdate() section:

          Code:
          protected override void OnBarUpdate()
                  {
          
                      if(
                          Close[0] > Open[0]
                          && HeikenAshi().HAClose[0] > HeikenAshi().HAOpen[0]
                          )
                          
                      {
                          BarColor = Color.Blue;
                          CandleOutlineColor = Color.Black;
                      }
                      
                      if(
                          Close[0] < Open[0]
                          && HeikenAshi().HAClose[0] > HeikenAshi().HAOpen[0]
                          )
                          
                      {
                          BarColor = Color.DarkGray;
                          CandleOutlineColor = Color.Black;
                      }
                      
                      if(
                          Close[0] < Open[0]
                          && HeikenAshi().HAClose[0] < HeikenAshi().HAOpen[0]
                          )
                          
                      {
                          BarColor = Color.Red;
                          CandleOutlineColor = Color.Black;
                      }
                      
                      if(
                          Close[0] > Open[0]
                          && HeikenAshi().HAClose[0] < HeikenAshi().HAOpen[0]
                          )
                          
                      {
                          BarColor = Color.YellowGreen;
                          CandleOutlineColor = Color.Black;
                      }
                      
                      if(HeikenAshi().HAClose[0] == HeikenAshi().HAOpen[0])
                          
                      {
                          BarColor = Color.White;
                          CandleOutlineColor = Color.Black;
                      }
                      
                          
                  }
          Last edited by arbuthnot; 05-24-2013, 03:27 AM.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Option Whisperer, Today, 09:55 AM
          1 response
          11 views
          0 likes
          Last Post bltdavid  
          Started by port119, Today, 02:43 PM
          0 responses
          1 view
          0 likes
          Last Post port119
          by port119
           
          Started by Philippe56140, Today, 02:35 PM
          0 responses
          3 views
          0 likes
          Last Post Philippe56140  
          Started by 00nevest, Today, 02:27 PM
          0 responses
          2 views
          0 likes
          Last Post 00nevest  
          Started by Jonafare, 12-06-2012, 03:48 PM
          5 responses
          3,986 views
          0 likes
          Last Post rene69851  
          Working...
          X