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

Ninza Renko Strategy

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

    Ninza Renko Strategy

    I want to create a strategy based on what I have shown in the pic below. Is this possible on strategy builder or would I need to pay someone to do this for me? I would like for it to be on strategy builder so I could make changes anytime I wanted.
    Thanks

    #2
    Hello Barrett,

    Thanks for your post.

    It would be possible to create this on the Strategy Builder, it may not be easy but it should be possible.

    If you have not worked with the strategy builder I would suggest using these free resources:

    Here are the educational resource available on 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

    It looks like you will need to define what an indecision bar is as that seems to be the key for your strategy. So I would suggest that your first and only effort would be to create the condition that verifies an indecision bar. To prove that the strategy can determine an indecision bar, I would suggest having the strategy draw a symbol on the chart below or above the bar. Here is a short video to help you with Draw markers and how to place them: https://paul-ninjatrader.tinytake.co...MF8xMTMwNTc0MA

    Once you have successfully verified the bar then you will have your strategy entry and exit points. I would suggest that your entry points only occur when the strategy is in a flat position, that "condition" can be found in the help guide.

    From your screenshot, I suspect you will not be able to use the Stoploss and profit target methods found in the "stops and Targets" window of the strategy builder and will instead need to use the exit methods found in the "order management" folder where you will have to provide the specific exit prices (for stop and profit ). These orders require special considerations and supporting code. I have detailed this to some extent in this thread: https://ninjatrader.com/support/foru...without-coding

    Again if this is new to you it will take some effort to finalize. Work in steps so that you can verify what you have done or are doing and once proven move to the next step. You may end upo building several small "concept" strategies to prove out what you need before you finally put it all together.

    If you would like a strategy created for you, we can provide a link to 3rd party programmers in the NinjaTrader Ecosystem.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      I am pretty decent with the strategy builder. Would I be able to indicate that a bar with a body less than 1 point be my indecision candle? Also, would I be able to define the green and red candles with bodies of 1 point in order to enter and exit my trades?

      Comment


        #4
        Hello Barrett,

        Thanks for your reply.

        Yes, although I do not have knowledge of the 3rd party bars, in general, a green (up) bar can be described as Close is greater than the Open and vice-versa for a Red (down) bar.

        You can get the range of a bar (high - low) by using the Range indicator, or you can subtract the High of the Bar from the Low of the bar. (Subtracting would be done using the offset). The indecision bars though you might want to look for the 1 point value to be between the close and open and not the high to low.



        Paul H.NinjaTrader Customer Service

        Comment


          #5
          I am revisiting this again but with edits. I have attached photos of how I have this in the strategy builder along with a photo of how the strategy looks in use. I have tested it and it seems to take trades in the middle of my big run. It also doesn't seem to open the trades like the photo either. I'm not sure why. This entire strategy might not be possible I don't know. I would also like for it to start a trade when the session starts. It looks like it already closes when the session does. When I add tick replay data it looks exactly like I want it to trade. I would be in your favor forever if you could help me get to trade just like the picture. I am trying to get it to run exactly as the chart picture if that's possible. I know I'm close but not quite there. I have it on bar close. I'm not sure if that makes a difference or not. I would love to show you pics of the logic I have so far but I don't want to share it with everyone yet. Is there a way I can share the logic pics with you personally? Maybe you could see what I have and tell me if I'm on the right track or not. As always I really appreciate the help. Ninjatrader is the greatest platform and support system I have ever used.
          Thanks
          Attached Files

          Comment


            #6
            Hello Barrett,

            Thanks for your reply.

            It is difficult to follow what you are writing as I am not sure which picture you are referring to in your descriptions.

            You do not have to post in the forums, you are always welcome to write directly to PlatformSupport[at]Ninjtrader[dot]Com with any questions you have.

            If you choose to write in, in this case as you have started your inquiry in the support forums, please write with the subject of Atten Paul, ticket# 3163064. In the body of the e-mail please include a link to this thread for reference.

            I would suggest including screenshots of what you want the strategy to trade like, what it is currently trading like, along with your settings as well as where you are testing (Strategy analyzer, live data, marker reply).
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              Click image for larger version  Name:	image.png Views:	0 Size:	71.9 KB ID:	1260952​I am trying everything I can to get the strategy builder to enter me when the price drops below the 25 EMA. I have stops and targets, but I can not get strategy builder to work with Ninza Renko bars. Can any of you help?
              Thanks
              Last edited by daytrader526; 07-18-2023, 01:24 PM. Reason: I may be in the wrong chat, if so I apologize. Never posted here before.

              Comment


                #8
                Hello daytrader526,

                Thanks for your notes.

                In the Strategy Builder, create a condition that checks if the current Low price (Price folder > Low) is less than the EMA(25) indicator (Indicators folder > EMA). This would check if the Low price (wick of the bar) goes below the EMA(25) indicator.

                I attached a screenshot demonstrating what this condition might look like in the Strategy Builder.

                See the help guide documentation below for more information.

                Conditions: https://ninjatrader.com/support/help...on_builder.htm
                Actions: https://ninjatrader.com/support/help...t8/actions.htm
                Attached Files
                Brandon H.NinjaTrader Customer Service

                Comment


                  #9
                  I did that, but it always waits until the next bar to enter. I need it to enter as soon as the price drops under.

                  Comment


                    #10
                    Hello daytrader526,

                    Thanks for your note.

                    When you run the strategy with Calculate.OnBarClose, the strategy will wait until the bar closes before processing OnBarUpdate() logic and will perform calculations on completed bars. If your strategy determines to enter an order, the order would be placed on the next bar. In this mode, your strategy will operate the same historically as it does when connected to real-time (or replay) data.

                    You could consider running the strategy with Calculate.OnPriceChange to have the logic in OnBarUpdate() process with each change in price. In the Strategy Builder, this setting is located on the Default Properties screen.

                    Using the calculate mode of Calculate.OnPriceChange or Calculate.OnEachTick will allow the strategy to be executed intrabar with a greater frequency which means your code will be executed on each tick or each change in price. Depending on the bar size and market volatility this can be a significant number of times per bar. You would be working with data that could change and your strategy conditions could change from one tick to the next. Entry orders would be executed intrabar instead of waiting until the next bar.

                    See this help guide page for more information about Calculate: https://ninjatrader.com/support/help.../calculate.htm

                    And, see this help guide about the Default Properties Strategy Builder screen: https://ninjatrader.com/support/help...opertiesScreen
                    Brandon H.NinjaTrader Customer Service

                    Comment


                      #11
                      Thanks, I have tried all three (On close, On Tics and Price change) I'm getting closer though. Thank you for your help

                      Comment


                        #12
                        Hello daytrader526,

                        Thanks for your notes.

                        If the strategy is not behaving as expected, debugging prints should be added to the strategy to understand how it is placing orders and behaving.

                        In the strategy add prints (outside of any conditions) that print the values of every variable used in every condition that places an order along with the time of that bar. Prints will appear in the NinjaScript Output window (New > NinjaScript Output window).

                        Below is a link to a forum post that demonstrates how to use prints to understand behavior.
                        https://ninjatrader.com/support/foru...121#post791121

                        Note that if you are running a backtest on the strategy then the strategy will only process with Calculate.OnBarClose. When in historical data (backtesting), only the Open, High, Low, and Close will be available and there will be no intra-bar data. This means actions cannot happen intra-bar, fills cannot happen intra-bar. All prices and actions come from and occur when the bar closes as this is all the information that is known.

                        Because of this, OnBarUpdate will only update 'On bar close' as it does not have the intra-bar information necessary for 'On price change' or 'On each tick' and the script will not have the intra-bar information to accurately fill an order at the exact price and time.​

                        See this help guide document on the differences on real-time vs backtest (historical).
                        http://ninjatrader.com/support/helpG...ime_vs_bac.htm

                        Additional information may be found in this NinjaTrader Forum post:
                        https://ninjatrader.com/support/forum/forum/ninjatrader-8/strategy-development/100192-comparing-real-time-historical-and-replay-performance?t=102504​​
                        Brandon H.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by helpwanted, Today, 03:06 AM
                        2 responses
                        21 views
                        0 likes
                        Last Post NinjaTrader_LuisH  
                        Started by DayTradingDEMON, Today, 09:28 AM
                        0 responses
                        1 view
                        0 likes
                        Last Post DayTradingDEMON  
                        Started by navyguy06, Today, 09:28 AM
                        0 responses
                        2 views
                        0 likes
                        Last Post navyguy06  
                        Started by rjbtrade1, 11-30-2023, 04:38 PM
                        2 responses
                        77 views
                        0 likes
                        Last Post DavidHP
                        by DavidHP
                         
                        Started by cmtjoancolmenero, Yesterday, 03:58 PM
                        7 responses
                        31 views
                        0 likes
                        Last Post cmtjoancolmenero  
                        Working...
                        X