Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

New Feature Request : AtmOrder of StartAtmStrategy

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

    #16
    Hello JerryWar,

    I’ve modified Jessica’s script demonstrating how to assign an order to an order object, print that orders order ID, and modify the price of that order which was created from an ATM and opened from a superdom.

    Within the foreach loop in State.DataLoaded, I check if the order name is “Stop1”, and if so, I assign that order an order object (stopOrder) as well as print that orders OrderID.

    Within OnBarUpdate, I modify the order object’s stop price and submit that change.

    To test this script, create a ATM template called AtmStrategy, with a stop and profit target of 5 ticks. Connect to the simulated data feed, open a superdom, select the ATM template AtmStrategy, and submit a market order. Then enable the attached strategy in the strategies tab, while an output window is open. You will see the order id printed as well as the stop move back 5 ticks.

    Please let us know if you need further assistance.
    Attached Files
    Last edited by NinjaTrader_AlanP; 07-18-2017, 03:56 PM.
    Alan P.NinjaTrader Customer Service

    Comment


      #17
      Alan, Awesome, Works as expected. I understand why you had me turn it on after the fact as there would be no order present and generate an error. Here is my question. I have to duplicate the section in State.Dataloaded to find the order when an order is manually entered. What i had done was to subscribe the Account to OnPostionUpdate so when it generated a position it set a static Var to let my Indicator know to start sending over stop Price changes and the indicator would respond back in a similar fashion with the stop price and a change flag. So here is my question. I still need the State.Dataloaded section incase I have to restart Ninja I need for the order to get picked up on restart. How do I tell if there are residing orders . Do I check for order.GetOwnerStrategy() = null and if so I know my position is Flat ?. or is there a better way.

      Comment


        #18
        Hello JerryWar,

        It might be risky to assume because order.GetOwnerStrategy() == null, that you do not have an open position. You may wish to use the logic I added on line 113, that prints the positions in the account, coupled with your order.GetOwnerStrategy == null check, to be more certain you do not have an open position.

        See the attached strategy.

        Please let us know if you have any additional questions or I misunderstood what you are asking.
        Attached Files
        Alan P.NinjaTrader Customer Service

        Comment


          #19
          Alan,
          That was exactly what I was looking. I knew there had to be a better way of picking up the order on Restart . One follow up Question, On Shutdown and Restart of Ninja I would normally assume because of State.Terminated should close any account subscriptions I might have already made. But I made a mistake in programming and did not add a subscription to be delisted in State.Terminated after adding a new one. After restarting Ninja the Subscription seemed to still be there because the code was generating printouts without the strategy loaded. Recovering from a crash that would also be true. So what is the proper way to check for any subscriptions on restart when no order is there ? I cannot find any Subscription methods to check this.

          Thanks
          Last edited by JerryWar; 07-20-2017, 11:49 AM.

          Comment


            #20
            Hello JerryWar,

            Likely you have something in your add-on or strategy that’s subscribing right on startup. I might suggest from within the NS editor, right clicking on suspected strategies/Add-ons, and excluding them from compilation, and restarting Ninja. When you have narrowed down the culprit, you can debug the script. It may be something you have in State.SetDefaults.

            Please let us know if you need further instruction.
            Attached Files
            Alan P.NinjaTrader Customer Service

            Comment


              #21
              I put print statements in all the subscription events to watch the execution etc.
              No subscription events seem to get triggered.

              Comment


                #22
                I excluded all compilations except changed version with Print Statements.
                It does change stop but I get no Account subscriptions it should be generating
                updates if I am subscribed.

                Changed indicator attached.
                Attached Files

                Comment


                  #23
                  I have crashed Ninja - Three times today with this strategy. My memory is blowing up.
                  I have all other strategies and ATM excluded yet when I just open a strategy window I get a printout that should only occur after the Strategy in loaded. See attached. The thing is once I load the strategy then I get no Subscription updates. Something is real wrong. I don't understand static vars that well and wonder whether all of this is really getting unloaded when I remove the indicator because it is acting like it is not.

                  Memory use is with only TWO charts.
                  Attached Files

                  Comment


                    #24
                    Hello JerryWar,

                    I received your email and will follow up with you through email.
                    Alan P.NinjaTrader Customer Service

                    Comment


                      #25
                      Execute and monitor ATM from NT8 Indicators

                      Originally posted by NinjaTrader_JessicaP View Post
                      Hello pmaglio,

                      This feature is being reviewed by the product management team and has been assigned the following unique tracking ID


                      SFT-2513


                      Please let us know if there is any other way we can help.
                      I am very interested in seeing this feature available in an upcoming release.

                      Thank you,
                      Peter

                      Comment


                        #26
                        NT8 essential feature needed.

                        Originally posted by NinjaTrader_JessicaP View Post
                        Hello pmaglio,

                        This feature is being reviewed by the product management team and has been assigned the following unique tracking ID


                        SFT-2513


                        Please let us know if there is any other way we can help.
                        __________________________________________________ _________________
                        This is an essential feature for NT8 to save time and avoid mistakes. Hello Markers Plus Users,
                        There is an old pending feature on Markers Plus for NinjaTrader 8
                        As you may know, on NinjaTrader 7 we dont need a Strategy because Markers Plus can do all its jobs from an indicator.
                        That helps to save an entire setup with just a single template.
                        On Ninjatrader 8 we need a strategy and its configuration is not saved with the templates.
                        I requested to add this functionality ( to be able to execute and monitor ATM orders from an indicator )

                        Comment


                          #27
                          New functionality request for Ninja Trader 8

                          Good morning all,
                          I am using Markers Plus with NinjaTrader8 and I would like to save an entire setup with just a single template and to be able to execute and monitor ATM orders from an indicator.

                          On Ninjatrader 8 I need a strategy and its configuration is not saved with the templates

                          Is it possible to implement this functionality in the future release of the NT8 platform?

                          Thank you in advance for your help

                          Kind regards

                          Marco

                          Comment


                            #28
                            Markers Strategy

                            This feature is being reviewed by the product management team and has been assigned the following unique tracking ID

                            I am using Markers Plus with NinjaTrader8 and I would like to save an entire setup with just a single template and to be able to execute and monitor ATM orders from an indicator.

                            On Ninjatrader 8 I need a strategy and its configuration is not saved with the templates

                            Is it possible to implement this functionality of NT8?

                            Kindest regards,


                            Martin

                            Thank you in advance for your help.

                            Comment


                              #29
                              Hello MartinKop, demo152160, and SigmaTrader,

                              I wanted to let you know that I have let the responsible teams know about your interest in SFT-2513 .

                              Additionally, use case #5 in this sample contains information regarding what NinjaTrader keeps in its template files, and how users can gain control over this.

                              http://ninjatrader.com/support/forum...ad.php?t=97919
                              Jessica P.NinjaTrader Customer Service

                              Comment


                                #30
                                Originally posted by pmaglio View Post
                                When we execute an order from an Addon and then assign an ATM to it, we only get the order id (entryOrder );
                                entryOrder = accountSelector.SelectedAccount.CreateOrder(....
                                but not the atm order id ;
                                AtmOrder = NinjaTrader.NinjaScript.AtmStrategy.StartAtmStrate gy(...
                                ( or at least it is not documented that StartAtmStrategy has a result )

                                Would it be possible to add that option so we can use all the ATM Strategy Methods to monitor that trade ?
                                http://ninjatrader.com/support/helpG...gy_methods.htm

                                Thank You !

                                I am also interested in this Ninja 7 feature which may be migrated to Ninja 8.


                                Thank you,
                                Raj

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by guilhem, Today, 02:09 PM
                                0 responses
                                1 view
                                0 likes
                                Last Post guilhem
                                by guilhem
                                 
                                Started by Hyper, Today, 12:20 PM
                                1 response
                                11 views
                                0 likes
                                Last Post NinjaTrader_Jim  
                                Started by TurtleTrader, Today, 11:50 AM
                                2 responses
                                22 views
                                0 likes
                                Last Post TurtleTrader  
                                Started by Ricam, Today, 12:21 PM
                                1 response
                                8 views
                                0 likes
                                Last Post NinjaTrader_PaulH  
                                Started by sidlercom80, Today, 11:52 AM
                                1 response
                                11 views
                                0 likes
                                Last Post NinjaTrader_Kate  
                                Working...
                                X