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 bars

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

    Heiken Ashi bars

    Hey guys, I'm a new NT8 user with a background using TOS. Regarding Heiken Ashi bars, is there a way to add when it turns pos or neg? I'd like to customize it accordingly.

    I'd also be interested in this same addition for range and renko bars...
    Last edited by trader14; 04-29-2019, 04:36 PM.

    #2
    Hello trader14,

    Thanks for your post and welcome to the NinjaTrader forums!

    I'm not sure what you mean by, "... is there a way to add when it turns pos or neg?" however you can certainly determine when the Heiken_Ashi changes color which is what I am assuming you mean by pos/neg. For example, if the previous bar was a down bar and the current bar was an up bar that would be a change in direction. Code wise it would look like:

    if (Close[1] < Open[1] && Close[0] > Open[0]) // direction change neg to pos

    if (Close[1] > Open[1] && Close[0] < Open[0]) // direction change pos to neg

    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thanks Paul so I'm trying to give myself this option when I build a strategy. I added the portions you suggested but it's not showing up when I go to build a strategy, what did I do?

      Also, can you explain what happens during the backtest when you set your bars to 1 min vs Heiken Ashi 1 min? Is the backtest not seeing when the HA bar closed? Does the backtest view a 1 min plain bar and a 1 min HA bar as closing the same?

      Thanks again

      Comment


        #4
        Hello trader14,

        Thanks for your reply.

        Regarding, "I added the portions you suggested but it's not showing up when I go to build a strategy" I'm sorry I do not understand what "it" is, can you provide a screenshot or further clarification of what is not showing up (unless that is related to your subsequent questions)?

        One minute bars will show actual data. Heiken-Ashi bars will present a set of false data (for the purposes of showing the trend) that are based on formulas. Here is a link that shows those formulas: https://www.investopedia.com/trading...r-candlestick/ As you can see, the close is actually the "average" value of the bar's OHLC (Open, High, Low, Close) data.

        For backtesting, you may want to use normal one-minute bars and can add on an indicator to have them displayed as Heiken-Ashi bars whilst using the actual one minute bar data for analysis. Here is a link to an N T8 add-on that will provide Heiken-Ashi as an indicator: https://ninjatraderecosystem.com/use...heiken-ashi-8/ Please note: The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The add-ons listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by rtwave, 04-12-2024, 09:30 AM
        2 responses
        20 views
        0 likes
        Last Post rtwave
        by rtwave
         
        Started by tsantospinto, 04-12-2024, 07:04 PM
        5 responses
        68 views
        0 likes
        Last Post tsantospinto  
        Started by cre8able, Today, 03:20 PM
        0 responses
        6 views
        0 likes
        Last Post cre8able  
        Started by Fran888, 02-16-2024, 10:48 AM
        3 responses
        49 views
        0 likes
        Last Post Sam2515
        by Sam2515
         
        Started by martin70, 03-24-2023, 04:58 AM
        15 responses
        115 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X