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 cmoran13, 04-16-2026, 01:02 PM
          0 responses
          42 views
          0 likes
          Last Post cmoran13  
          Started by PaulMohn, 04-10-2026, 11:11 AM
          0 responses
          25 views
          0 likes
          Last Post PaulMohn  
          Started by CarlTrading, 03-31-2026, 09:41 PM
          1 response
          162 views
          1 like
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          98 views
          1 like
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          157 views
          2 likes
          Last Post CaptainJack  
          Working...
          X