Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Wizard Question

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

    Strategy Wizard Question

    Greetings,

    First off, I am not a programmer! I am trying to learn the Strategy Wizard. Here is my problem......
    Here's the scenario.
    Say I am simply going to enter a long or short position on a limit order when two MA's crossover, or a volume surge or any single event trigger, and you want to place the limit at an MA (or some updating position) for your entry position.
    Here's what I know....
    I can get the strategy to place the order at an MA or at any indicator for that matter. But if it does not fill on the bar/candle after the trigger event then the order disappears because the conditions change and trigger condition is history. My issue is trying to get a limit order for any reason to remain active and update as the MA moves after the trigger places the limit order. Until it is filled.
    Can this be done using the Strategy Wizard? Any Thoughts?

    #2
    Hi PraiseOne, welcome to the NinjaTrader support forums! Limit ordes expire per default at the end of the bar, you could try placing the order with your MA value as the limitorder price so it updates for the next bar if your other conditions are still valid.

    Outside of the wizard you could set liveUntilCancelled to true to keep it active until you are filled or want to CancelOrder it.

    Here are some useful links -





    Comment


      #3
      Thanks

      THanks Bertrand, I will check out the links closer. I looked over briefly. And I had set up the order so it enters at the EMA location it just was not staying live. I may have a question when I complete the strategy, where in the text if I open it to insert the Livetilcanceled command.
      Thanks Again I appreciate your effort.
      Chris

      Comment


        #4
        You're welcome Chris, please let me know when I can be of help.

        Comment


          #5
          Additional question

          Bertrand, I made a copy of the file I had working correctly, I UNLOCKED the new copy, can you tell me where to insert liveUntilCancelled = true?
          Everything was working fine I just need the strategy limit order to remain active until filled. Seems like an easy task, I am not a programmer but know enough to add this if you show me the lines to add and where to add them.
          These are the current command lines......
          EnterLongLimit(DefaultQuantity, Bollinger(1.5, BBFAST).Middle[0] + 1 * TickSize, "ENTRY300");
          EnterShortLimit(DefaultQuantity, Bollinger(1.5, BBFAST).Middle[0] + 1 * TickSize, "ENTRY300");

          Or do I simply enter liveUntilCancelled = true
          Where the command CalculateOnBarClose = true; appears?

          Comment


            #6
            Hi, great job! You want to use another overload for the EnterLongLimit then, the one that offers the liveUntilCancelled parameter - http://www.ninjatrader-support.com/H...LongLimit.html

            Your long would then look like this -
            Code:
            [SIZE=2][SIZE=2]EnterLongLimit([/SIZE][/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][SIZE=2], [/SIZE][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]true[/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][SIZE=2], DefaultQuantity, Bollinger([/SIZE][/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]1.5[/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][SIZE=2], [/SIZE][/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]10[/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][SIZE=2]).Middle[[/SIZE][/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][SIZE=2]] + [/SIZE][/SIZE][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080][SIZE=2][COLOR=#800080]1[/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][SIZE=2] * TickSize, [/SIZE][/SIZE][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000][SIZE=2][COLOR=#800000]"ENTRY300"[/COLOR][/SIZE][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][SIZE=2]);
            [/SIZE][/SIZE]

            Comment


              #7
              Thanks, & Continuation

              Thanks, Bertrand, That worked to keep it live. Now my problem is that it does not continue to update as the indicator in this case it was a Bollingerband. It used the band as instructed to enter the order. which was great. How can I get it to update the limit price as the band moves until it fills?

              By the way you have been a GREAT help.

              Just a reminder, I am locked out of the Strategy Wizard(as I unlocked to set liveuntilcancel=true), but I have the original that I can still change if there is a way to do that in the wizard first before making the change on liveuntilcancelled.
              Or if you know the change to the code that would be sweet too.
              Hope you are having a GREAT day.

              Chris

              Comment


                #8
                Chris,

                If you want it to update you need to resubmit the order again with the new price.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Thanks

                  Josh,
                  So how do I do that then. The Trigger is an initial event, so the strategy will not so it without some instructions. I was in the training this weekend and this was my only real question. I have the strategy setting the order up...... But it is a triggered event like when volume hits X then you want ion at the indicator value. The event triggers the plan, then the order needs to remain with the instrument. I asked this in class but was pushed from Saturday saying we would cover it tomorrow, and then Sunday we did not. So where do I go, from here. PLease let me know. I need the order to continue to be submitted then how do I do that in the strategy wizard?

                  Comment


                    #10
                    You will need to rethink the logic for your strategy yourself. Right now your strategy submits the order at a certain price. You want to change the price which means you need to resubmit the order at the new price. As to when you want to resubmit is for you to decide.

                    Maybe you want to keep resubmitting only when you are flat (expand the Strategy section in the Condition Builder). With this condition you still need to ensure that you already placed the first order in though. Set some sort of User Variable to know that you have submitted already and proceed that way.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #11
                      ok

                      Originally posted by NinjaTrader_Josh View Post
                      You will need to rethink the logic for your strategy yourself. Right now your strategy submits the order at a certain price. You want to change the price which means you need to resubmit the order at the new price. As to when you want to resubmit is for you to decide.

                      Maybe you want to keep resubmitting only when you are flat (expand the Strategy section in the Condition Builder). With this condition you still need to ensure that you already placed the first order in though. Set some sort of User Variable to know that you have submitted already and proceed that way.

                      We did not cover those User Variables in the class we asked but it was not covered. I know how to access the variables at the begining of the Wizard (user defined) but not setting up the variables under the other tab. If you read my initial note, I want the triggered entry, to continue submitting/updating until it is filled at the indicator value as it updates. If it resubmits the same order it should have the new location every time a new bar happens. The problem is that the trigger event is a 1 time action like a crossover or a volume spike and that is no longer true on the next bar.
                      This forum was to be our way to continue to learn the wizard per our class this weekend. But my evaluation of it is going down hill very fast. Not sure I would reccommend the class to anyone else if there is no way to follow up with legitimate functional questions.

                      Comment


                        #12
                        Sorry

                        Sorry if I sounded harsh on that last note but very frustrated right now. Because I asked this in class and it is not a specific trading question it is a function question.
                        How do you get a 1 time trigger event to stay ON. So that a limit order will continue updating at some changing lovcation(ANY indicator - EMA, SMA, BB, etc) until it Fills the postion?

                        Comment


                          #13
                          Hi PraiseOne, for this it would need some more advanced concepts as Josh outlined, best would be then to not set it automatically resubmit because it would keep the price static. You can just let the 'old price' order expire and submit a new one with the new price on the next bar. For this you set a flag type user variable to check if your filled already or not. Once you are in your trade (indicated for example by MarketPosition change), you can set the user variable to a value that would not start your resubmitting procedure.

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                          0 responses
                          646 views
                          0 likes
                          Last Post Geovanny Suaza  
                          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                          0 responses
                          367 views
                          1 like
                          Last Post Geovanny Suaza  
                          Started by Mindset, 02-09-2026, 11:44 AM
                          0 responses
                          107 views
                          0 likes
                          Last Post Mindset
                          by Mindset
                           
                          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                          0 responses
                          569 views
                          1 like
                          Last Post Geovanny Suaza  
                          Started by RFrosty, 01-28-2026, 06:49 PM
                          0 responses
                          573 views
                          1 like
                          Last Post RFrosty
                          by RFrosty
                           
                          Working...
                          X