Announcement

Collapse
No announcement yet.

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 sjsj2732, Yesterday, 04:31 AM
          0 responses
          32 views
          0 likes
          Last Post sjsj2732  
          Started by NullPointStrategies, 03-13-2026, 05:17 AM
          0 responses
          286 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          283 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          133 views
          1 like
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          91 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Working...
          X