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

FromEntrySignal always empty?

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

    FromEntrySignal always empty?

    Currently, in NT, it seems that (apart from StopLoss and ProfitTarget), "order.FromEntrySignal" parameter is empty. So, for example,

    Code:
    ExitShortStopMarket(quantity,Price);
    when Exit happens, inside OnExecution method, we dont have an information which order is exiting.

    Please, submit feature request, to have the "entry" order details available, when Exit order is being executed.
    Last edited by ttodua; 09-26-2018, 04:25 PM.

    #2
    Hello TazoTodua,

    After the trade is closed you can check the SystemPerformance for the last trade and get both the entry and exit.

    SystemPerformance.AllTrades[SystemPerformance.AllTrades.Count - 1].Entry.Name
    SystemPerformance.AllTrades[SystemPerformance.AllTrades.Count - 1].Exit.Name

    Below is a public link to the help guide on SystemPerformance.



    Other wise you would need to store the last entry order to a variable and reference the variable.

    Below is a public link to the help guide on Order.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      No, unfortunately, i am using bunch of LONG/SHORT/STOP/LIMIT/STOP orders in strategy, and just referring to last executed trade, is useless in such case. I needed the exact/safer way, which seems not to exist.

      Please, submit that a feature request, to have the entry-order details provided when exit/close order happens

      Comment


        #4
        Hello TazoTodua,

        With any order type you can absolutely store the Order object to a variable and reference this later.

        I will submit a feature request on your behalf for an Order object that is an exit order to reference another order object that is an entry to the position it is closing.

        Once I have a tracking ID for this request I will post in this thread for future reference.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Yes, it can be stored in objects, however, yes yes, make NT more powerful and simplify our tasks , thanks! will be nice if that was passed in reference in OnOrderUpdate/etc..


          as a sub-request (i dont know if it has been discussed) but it was also nice if OnPositionUpdate has the reference too at least of ORDER NAME which is causing that OnPositionUpdate. (if not named-order is causing that, then empty string, but if named instance of order causing that, then it could be available in OnPositionUpdate too. I think will be useful).

          Comment


            #6
            Hello TazoTodua,

            Are you saying you want OnPositionUpdate to have a collection with all entry orders that contributed to the open position?
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Hello TazoTodua,

              I've received tracking ID #SFT-3547 for you request for Order objects to have an Order object property that references the entry Order object if the Order is an exit.
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                yes, and in addition to that request please, add this sub-request too:

                in
                OnExecutionUpdate(Execution execution ,....)


                execution.order --- Doesnt contain the order name. very strange, in Execution also, we cant directly find out which order(name) is that.
                please, add that order.name(details that are available in OnOrderUpdate) was also available in OnExecutionUpdate (i doubt that in addition to .Name, there are other paramteres not available in OnExecutionUpdate -only OrdeId, which forces us to custom extra code to store the orders and identify them.... so, just enrich the OnExecutionUpdate )
                Last edited by ttodua; 09-28-2018, 03:02 AM.

                Comment


                  #9
                  Hello TazoTodua,

                  I'm replying on behalf of Chelsea who is out of the office today.

                  When I test on my end, I am able to print the order name from execution.Name and execution.Order.Name.

                  Demo - https://drive.google.com/file/d/1kQF...w?usp=drivesdk

                  Code to test
                  Code:
                  protected override void OnExecutionUpdate(Cbi.Execution execution, string executionId, double price, int quantity, 
                  	Cbi.MarketPosition marketPosition, string orderId, DateTime time)
                  {
                  	Print(execution.Name);
                  	Print(execution.Order.Name);
                  }
                  
                  protected override void OnBarUpdate()
                  {
                  	if(CurrentBar % 2 == 0)
                  		EnterLong("EnterLong");
                  	else
                  		EnterShort("EnterShort");
                  }
                  When you take the same test on your end do you see different results?

                  I look forward to being of further assistance.
                  JimNinjaTrader Customer Service

                  Comment


                    #10
                    thanks, my bad! probably i am wrong because i used execution.ToString() and couldnt see the name in that... ok, disregard that ! however, other request still exist.

                    Comment


                      #11
                      Hello TazoTodua,

                      I've submitted a feature request for passing an Order object for the order that updates a position in OnPositionUpdate. The feature request is SFT-3551.

                      We cannot offer an ETA or promise of fulfillment, but we are tracking interest and the ticket ID number will be noted in the help guide when a new build gets released with the feature implemented.

                      Release Notes - https://ninjatrader.com/support/help...ease_notes.htm

                      Please let us know if there is anything else we can do to help.
                      JimNinjaTrader Customer Service

                      Comment


                        #12
                        Please add my vote for both SFT-3551 and SFT-3547

                        Comment


                          #13
                          thanks for support, i have a bit more hope that votes might be considered..

                          Comment


                            #14
                            Hello cutzpr,

                            I've added your votes.
                            JimNinjaTrader Customer Service

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by inanazsocial, Today, 01:15 AM
                            1 response
                            6 views
                            0 likes
                            Last Post NinjaTrader_Jason  
                            Started by rocketman7, Today, 02:12 AM
                            0 responses
                            10 views
                            0 likes
                            Last Post rocketman7  
                            Started by dustydbayer, Today, 01:59 AM
                            0 responses
                            2 views
                            0 likes
                            Last Post dustydbayer  
                            Started by trilliantrader, 04-18-2024, 08:16 AM
                            5 responses
                            23 views
                            0 likes
                            Last Post trilliantrader  
                            Started by Davidtowleii, Today, 12:15 AM
                            0 responses
                            3 views
                            0 likes
                            Last Post Davidtowleii  
                            Working...
                            X