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

RE: Strategy help

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

    RE: Strategy help

    Hi,

    I am currently using the strategy builder on ninjatrader 8 for the first time so it would be helpful if you clarify/guide me as if you are talking to a novice lol. I have a few questions regarding certain things that i need done that i have not been able to figure out just yet and was hoping you can help.

    1. If i make the strategy using nt8 strategy builder. once it is finished can i use it on ninjatrader 7? if it is not reverse compatible how would i make it compatible?
    2. On the conditions tab for the strategy builder, under actions, i have directed it to put two orders (both long and short) once my conditions have been met. Once one side fills i would like it to cancel the other order. Is this possible? If so, how would i do it?
    3. I have my strategy trading every day of the week but cannot figure out how to make refrain from trading within a 15 minute window on a specific day. Would like it to refrain from trading on wednesdays from 7:25 - 7:35 am pacific.
    4. I have the strategy open to take trades during a certain time frame, but by 1:00 pacific time, i need to flatten everything.

    Thank you in advance for your guidance and your assistance

    #2
    Hello,

    Thanks for your post.

    1) No, ninjascript is not compatible between NT7 and NT8. You would need to rewrite your strategy in NT7 using the strategy wizard. In both cases you can take advantage of the recorded training webinars on the strategy builder and strategy wizard to get you up to speed, here are links to each:
    NT7 Strategy Wizard: https://www.youtube.com/watch?v=FmBi...56536A44DD7105
    NT8: Strategy Builder: https://www.youtube.com/watch?v=HCyt...We0Nf&index=11

    In addition, I will link the relevant help guide sections.
    NT7 Help guide: https://ninjatrader.com/support/help...egy_wizard.htm
    NT8 Help guide: https://ninjatrader.com/support/help...gy_builder.htm

    2) What type of orders are you placing? Are the orders in the same set or a different set for each (meaning different conditions)? Can you clarify what you are trying to accomplish?

    3) In the strategy builder you can build a condition that checks to see if the current bar time series is equal to a day of the week where you would select Wednesday and if the time series is between your specified times The times are creating a time filter which is shown in the help guide of the conditions builder. Once those conditions are met, you can set the state of a bool variable (either true or false). The bool variable can then be added as an entry condition in your entry sets. For example, if the bool is true then you can trade, if the day is Wednesday between your times then the bool could be set false which would prevent entering trades at that time.

    4) Using a time condition, once the time is met, in the action section of the set you can simply ExitLong() and ExitShort(), if no positions exist then the methods do nothing, if a position exists is would close that position. You would also want to prevent further entries as well so again you would want to set another bool variable that is used as part of the entry conditions to prevent entries after your time.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thank you for your response!

      1. got it. thank you for the links. i have watched them and am currently using both video and the help guides to develop this strategy currently
      2. the orders i am placing is stop limit orders for 1 strategy and limit for another version of the same strategy. for version 1, i directed the strategy to find doji's using (condition candlestick doji = candlestick doji, then i want a stop limit order on top of bid 1 tick higher than doji high, and another stop limit order 1 tick lower than low of doji which would be another stop limit. once one order gets filled i would like it to cancel out the other order.
      version 2 would be the same thing except that it would be limit orders.. long 1 tick above doji, short 1 tick below doji
      3. i have my time periods set up so that it could trade during certain time frames just like the help guide suggests under "time frame". i basically need it to flatten everything for each day at 1:00 pm. also, im following you up until this point "The bool variable can then be added as an entry condition in your entry sets. For example, if the bool is true then you can trade, if the day is Wednesday between your times then the bool could be set false which would prevent entering trades at that time." should i be putting another condition set up via the bool series so that it flattens everything at 12:59 pacific to exchange open? this bool series thing is kind of confusing me because i need it to stop trading signals and flatten all signals during a certain time however i followed the example in the help guide that directs giving a time frame to trade within without the bool series. Not sure how i should go about this
      4. i got you up until this point: "if no positions exist then the methods do nothing, if a position exists is would close that position. You would also want to prevent further entries as well so again you would want to set another bool variable that is used as part of the entry conditions to prevent entries after your time." do you think you can show me an example of this one?

      Thank you for the help and clarification thus far!

      Comment


        #4
        Hello,

        Thanks for your reply.

        The strategy builder uses the "managed approach" concerning orders and I recommend that you review the help guide section on this as there are "rules" to prevent unwanted positions and the placing of two entry orders may put you in violation depending on conditions as defined in the rules. Please see, "Internal Order Handling Rules that Reduce Unwanted Positions": https://ninjatrader.com/support/help...d_approach.htm When you run your strategy you should observe the "log" tab of the control center for any error/warning messages about orders being ignored.

        Additionally, in the Managed Approach, orders that are placed but not filled are automatically canceled at the close of the bar where the order was placed.

        Regarding the use of a bool, I've created a short video to clarify: https://Paul-ninjaTrader.tinytake.co...ExN184ODUwMDE3

        You would use a similar approach for the Flatten set and another bool to also prevent entries, keeping in mind that you will need another set to restore the bool to true to allow entries to occur.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Thank you for this. I also have a question regarding the condition sets. I am trying to wrap my head around the condition sets and how it works. If i put a condition on set 1 and a condition on set 2, will condition set 2 only perform after set 1's conditions have been met or does the order of the conditions via set 1-10 not really matter? thank you

          Comment


            #6
            hi Paul,

            Thank you so much for the video you posted above. It helps so much having a video instead of just getting a message. Ive been on these boards for years now and i think having videos for replies really really helps alot!

            I tried running the strategy and i keep getting errors that the stop losses are on the wrong side. Do you think you can make another video on how to make a doji strategy? The following is the parameters i would like

            1. 1000 tick chart
            2. input page needs stop loss and profit parameters so i can optimize stops and profit targets
            3. condition page set 1 - when doji occurs i would like ninja to put 2 orders ( one buy order 1 tick below doji, one sell order 1 tick above doji)
            4. stop loss of 5 ticks and profit target of 12 ticks

            Thank you again for your help!

            Comment


              #7
              Hello,

              Thanks for your reply.

              Glad that the video was helpful to clarify the creation and use of a bool.

              We would not provide a video to show you exactly how to create your own strategy just as we would not create your strategy for you, as that is beyond our scope of support, we provide assistance in terms of educational links to help you learn to develop your own strategy. If you would like your strategy created for you, we can provide references to 3rd party coders who would be happy to provide this service.

              Your Doji strategy with two entry orders will not work in the managed approach, with reference to my prior post: "The strategy builder uses the "managed approach" concerning orders and I recommend that you review the help guide section on this as there are "rules" to prevent unwanted positions and the placing of two entry orders may put you in violation depending on conditions as defined in the rules. Please see, "Internal Order Handling Rules that Reduce Unwanted Positions": https://ninjatrader.com/support/help...d_approach.htm When you run your strategy you should observe the "log" tab of the control center for any error/warning messages about orders being ignored."
              Paul H.NinjaTrader Customer Service

              Comment


                #8
                ahh no wonder! i have been trying every which way for several days now.. can you point me in the direction of some good people to shop around with to get this strategy created?

                also, is there a function in the strategy builder to be able to save a strategy template? creating my trade and no trade time filters was kind of a pain and would like to use it on another strategy idea

                Thank you Paul!

                Comment


                  #9
                  Hello,

                  Thanks for your reply.

                  I'll ask our sales team to provide you with links to 3rd party programmers.

                  I've created a short video on how to save conditions and actions: https://Paul-ninjaTrader.tinytake.co...EzNl84ODk3Mjg3
                  Paul H.NinjaTrader Customer Service

                  Comment


                    #10
                    Hello mrxdaviepoo,

                    Thank you for your interest in NinjaTrader.

                    You can search our extensive library of NinjaScript consultants through the link below. Simply enter a consultant name or search by using our filter categories. Once you have identified your consultants of choice, please visit each consultant's site for more information or contact them directly to learn more:

                    Search trading indicators, apps and services to personalize your NinjaTrader software. Explore custom trading indicators, automated strategies, free trading apps & more!


                    You can locate the contact information for the consultants on their direct websites for any additional questions you may have. Since these consultants are third-party services for NinjaTrader, all pricing and support information will need to be obtained through the consultant.

                    This 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 companies and services 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.
                    Christopher S.NinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by ZenCortexCLICK, Today, 04:58 AM
                    0 responses
                    5 views
                    0 likes
                    Last Post ZenCortexCLICK  
                    Started by sidlercom80, 10-28-2023, 08:49 AM
                    172 responses
                    2,281 views
                    0 likes
                    Last Post sidlercom80  
                    Started by Irukandji, Yesterday, 02:53 AM
                    2 responses
                    18 views
                    0 likes
                    Last Post Irukandji  
                    Started by adeelshahzad, Today, 03:54 AM
                    0 responses
                    8 views
                    0 likes
                    Last Post adeelshahzad  
                    Started by Barry Milan, Yesterday, 10:35 PM
                    3 responses
                    13 views
                    0 likes
                    Last Post NinjaTrader_Manfred  
                    Working...
                    X