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

Strategy Builder and Counting Bullish Bars

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

    Strategy Builder and Counting Bullish Bars

    Hello all. I am excited to be here. I am totally new to the NT platform. I am trying to learn the Strategy Builder and I would like to build a strategy that will open a position when Heikin-Ashi shows a second bullish candle. How can it be done with the help of the builder?

    #2
    Hello Radano,

    Thanks for your post and welcome to the NinjaTrader forums!

    A bullish bar is one where the Close of the bar is greater than the Open of the bar. When you create a condition with price bars, by default the strategy builder will reference the current bar which has a value of 0 barsago. To reference the previous bar you would change the barsago value to 1. If you wanted to keep going back the next bar would be 2 and so on.

    Below I have attached a screenshot of the conditions of interest. In one example I showed the selections made. Note that the strategy builder changes "Close" to "default input", this is signifying that the close price is the default input.

    Click image for larger version

Name:	Radano-1.PNG
Views:	592
Size:	43.8 KB
ID:	1151562

    If you have not gone through the educational resources on the Strategy Builder, please take advantage of learning the Strategy Builder:
    Free live webinar every other Thursday at 4:00 PM EST, through this link to all webinars: https://ninjatrader.com/PlatformTraining
    Previous recording of the Strategy Builder 301 webinar: https://youtu.be/HCyt90GAs9k?list=PL...auWXkWe0Nf&t=2
    Help guide for the strategy builder: https://ninjatrader.com/support/help...gy_builder.htm

    The help guide section on the condition builder shows many examples that will help you.

    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hello Radano,

      I also wanted to mention that if you intended to use the Strategy Analyzer please be aware that backtesting with Heiken-Ashi price bars will yield unrealistic results because the strategy analyzer will use the price of the Heiken-Ashi bars as the actual price and Heiken-Ashi bars do not present the real price.

      If you wanted to back test your strategy using the correct price data then we recommend downloading and installing the HeikenAshi8 indicator. The indicator will visually change the bars but the real price data is still available to the analyzer. In this case, the Strategy Builder conditions would need to use the price values of the HeikenAshi8 indicator.

      if you are not intending to do backtesting then you can use the Heiken-Ashi price bars and on real time or Playback with market replay data you will get correct fills.

      In any case here is a link to the indicator if needed.

      This indicator is publicly available on our NinjaTrader Ecosystem website:Here is a basic guideline of how to Import NinjaScripts.

      To import NinjaScripts you will need the original .zip file.

      To Import
      1. Download the NinjaScripts to your desktop, keep them in the compressed .zip file.
      2. From the Control Center window select the menu File> Utilities> Import NinjaScript
      3. Select the downloaded .zip file
      4. NinjaTrader will then confirm if the import has been successful.

      Critical - Specifically for some NinjaScripts, it will prompt that you are running newer versions of @SMA, @EMA, etc. and ask if you want to replace, press 'No'

      Once installed, you may add the indicator to a chart by:
      • Right click your chart > indicators > Select the Indicator from the list on the left > New > OK

      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


        #4
        Thank you very much for the extensive explaination. I built a simple strategy presented in Strategy Builder 301 video just for the educational purposes. It has compiled properly. Now, I wanted to backtest the strategy however after pressing the RUN button nothing happens. I am connected through TDAmer account and connection is lit "green". Any idea what am I missing?

        Comment


          #5
          Hello Radano,

          Thanks for your reply.

          As a simple test, please run the strategy SampleMACrossover on the same selected data and period. If you get trade results there then that says the data is okay and theat there would be an issue with your strategy.

          If the strategy is the issue, please check the "Log" tab of the Ninjatrader control center for any related error messages (related to your strategy).

          If no data then the issue may be based on the historical data provided by TDA. With reference to this document, TDA does not provide historical tick data: https://ninjatrader.com/support/help...y_provider.htm

          If the bars you are using are tick based then you would not see any trades, please test using standard 1 minute bars as these are provided by TDA.
          Paul H.NinjaTrader Customer Service

          Comment


            #6
            Originally posted by NinjaTrader_PaulH View Post
            If the bars you are using are tick based then you would not see any trades, please test using standard 1 minute bars as these are provided by TDA.
            Unfortunately, no data for 1 min from TD, only D analysis works. How do I connect to NT Continuouus? What redentials does it require?
            Last edited by Radano; 04-17-2021, 06:53 AM.

            Comment


              #7
              Hello Radano,

              Thanks for your reply.

              The TDA connection in NinjaTrader would provide 1-minute historical data on equities. If you are looking for Futures data you would need a different data feed.

              How do I connect to NT Continuouus? What redentials does it require? Please contact our brokerage at brokeragesales[at]NinjaTrader[dot]Com for details of opening an account and the license key requirements.

              Paul H.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by sidlercom80, 10-28-2023, 08:49 AM
              170 responses
              2,273 views
              0 likes
              Last Post sidlercom80  
              Started by Irukandji, Yesterday, 02:53 AM
              2 responses
              17 views
              0 likes
              Last Post Irukandji  
              Started by adeelshahzad, Today, 03:54 AM
              0 responses
              3 views
              0 likes
              Last Post adeelshahzad  
              Started by CortexZenUSA, Today, 12:53 AM
              0 responses
              3 views
              0 likes
              Last Post CortexZenUSA  
              Started by CortexZenUSA, Today, 12:46 AM
              0 responses
              1 view
              0 likes
              Last Post CortexZenUSA  
              Working...
              X