Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi‐Day Breakouts strategy by NinjaTrader_Jim: Unable to set Quantity to 1.

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

    Multi‐Day Breakouts strategy by NinjaTrader_Jim: Unable to set Quantity to 1.

    Hi,
    I downloaded the Multi‐Day Breakouts strategy by NinjaTrader_Jim the other day and I can't seem to figure out how to keep the quantity setting to stay at 1. Soon as the strategy become active, it tries to place over 2000 positions exceeding the instrument's max position quantity. Does anyone have a solution for this? I would be hugely appreciative.

    Thanks in advance!

    Frank

    #2
    Welcome to the forums 13Favre33!

    The PositionSizing Property will need to be disabled and the Quantity property will need to be set to 1. (PositionSizing increases quantity in the script.) I noticed that the User App Share script did not allow disabling this because a Range attribute was applied. I have submitted a correction for the User App Share script, but you may download the script from the link below to be able to disable PositionSizing in the meantime.

    www.ninjatrader.com/SC/November2017SCNT8.zip

    We look forward to assisting.
    Attached Files

    Comment


      #3
      Hi Jim!
      Thanks so much for getting back to me so quickly! Yeah I think it's working now. I have it on a sim trade at the moment testing 4 different instruments. I was wondering, do you have a version of this strategy that works both Long and Short, in both directions?

      Any case, I'm really excited about this strategy and would like to thank you for making it available to the community. Thanks again Jim!

      Frank

      Comment


        #4
        Hello Frank,

        The original study from the Stocks and Commodities article only described long entries, so that is what I had done with our script.

        You could try adapting the source code use short entries instead, but you may also want to change the logic so if(Close[i+1] < Close) is checked at line 88 as opposed to if(Close[i+1] > Close). You could then adapt both the short and long code in a separate strategy script to allow both long/short entries.

        Managed Approach order methods can be referenced here - https://ninjatrader.com/support/help...d_approach.htm

        Please note that I cannot make any promises for usefulness or profitability with those changes.

        Comment


          #5
          Hi Jim and Frank,
          New to NT.
          Interesting discussion. I could not find out Multi-day breakout strategy, could you please point me to that so I can download/import and read about it

          Thanks

          Comment


            #6
            Hello gbajaj,

            The script is based off of the Stocks and Commodities article from November 2017 titled 'Swing Trading Four‐Day Breakouts' by Ken Calhoun. You can download the script from my link in post #2, and on the User App Share following the link below.

            The Multi&dash;Day Breakouts strategy was published in the November 2017 Stocks and Commodities article titled &apos;Swing Trading Four&dash;Day Breakouts&apos; by Ken Calhoun.


            The Stocks and Commodities article can be found here - https://store.traders.com/stcov35737sw.html

            (The links above are publicly available.)

            Comment


              #7
              Originally posted by NinjaTrader_Jim View Post
              Welcome to the forums 13Favre33!

              The PositionSizing Property will need to be disabled and the Quantity property will need to be set to 1. (PositionSizing increases quantity in the script.) I noticed that the User App Share script did not allow disabling this because a Range attribute was applied. I have submitted a correction for the User App Share script, but you may download the script from the link below to be able to disable PositionSizing in the meantime.

              www.ninjatrader.com/SC/November2017SCNT8.zip

              We look forward to assisting.
              Hi Jim,

              When the positionsizing is disabled I'm getting this error: value of property "positioinsizing' of ninjascript 'multi-day breakouts' is false and not in range between 1 and 2147483647. This is after I apply the strategy to the chart.

              Thank you for the strategy and reply.
              Mike

              Comment


                #8
                Hello cirque73,

                Thanks for your post and welcome to the NinjaTrader forums!

                Jim was out of the office yesterday and is out today as well so I apologize for not replying sooner.

                Can you clarify how you are testing?

                On Live data, or playback with Market replay data, or strategy analyzer?

                What instrument, bar type, and bar size?

                Can you advise all of the other strategy settings you are using? (perhaps a screenshot of the parameters)

                Comment


                  #9
                  Hello Jim.

                  I found the MULTI-DAY BREAKOUTS SATRATEGY and backtest it in NQ 2 min time frame for the month of October 2022 and results are very high so I decided to configured the strategy to run but I'm havivig this 2 errors at same time.

                  Please find attached the 2 errors messages and my configurantion.

                  I wil really apreciated any help to put this on the run because the 30 days backtesting results with may configurationsare very high ( maybe this is an posible error also).

                  Thanks​
                  Attached Files

                  Comment


                    #10
                    Hi Cleofe, welcome to the fourms. For future reference, you can use the Windows Snipping tool to take screen shots directly from your computer.

                    Your trail stop value is very close to the market price, so its likely experiencing an in-flight error from being so close to the market price (The strategy can try to change the stop price and the market price change before the submission, so the order gets rejected). Do you get the same error if you pull the trail stop back a bit like 5 or 10 ticks?

                    Comment


                      #11
                      Hello Chris,

                      I'm using the strategy minutes or renko .
                      decided to use the default setting after you answer and use Renko15 bars but I'm getting the same errors.
                      I really like the strategy because it seems profitable but I don't know what I'm doing wrong.
                      Do you have any documents or rules for it?


                      Need help

                      Thanks​

                      Comment


                        #12
                        Hi Cleofe, thanks for the follow up. Unfortunately, we do not possess any further documentation that I can provide for this strategy.

                        Comment


                          #13
                          Thanks Chris,

                          Can you put me in contact with Jim? I see he is the creator, maybe he can help with the code.​

                          Comment


                            #14
                            Hi Cleofe, Unfortunately, he does not work in the support department anymore. The scripts uploaded to the user app share come "As Is" and the users are required to be able to study the source code for any additional reference.

                            Comment


                              #15
                              Originally posted by NinjaTrader_ChrisL View Post
                              Hi Cleofe, Unfortunately, he does not work in the support department anymore. The scripts uploaded to the user app share come "As Is" and the users are required to be able to study the source code for any additional reference.
                              Thanks for your help

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by NullPointStrategies, Yesterday, 05:17 AM
                              0 responses
                              62 views
                              0 likes
                              Last Post NullPointStrategies  
                              Started by argusthome, 03-08-2026, 10:06 AM
                              0 responses
                              134 views
                              0 likes
                              Last Post argusthome  
                              Started by NabilKhattabi, 03-06-2026, 11:18 AM
                              0 responses
                              75 views
                              0 likes
                              Last Post NabilKhattabi  
                              Started by Deep42, 03-06-2026, 12:28 AM
                              0 responses
                              45 views
                              0 likes
                              Last Post Deep42
                              by Deep42
                               
                              Started by TheRealMorford, 03-05-2026, 06:15 PM
                              0 responses
                              50 views
                              0 likes
                              Last Post TheRealMorford  
                              Working...
                              X