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

Target before entry

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

    Target before entry

    Hello,


    I want to ask please how it is possible to bring in a "target" before the entry to avoid being late in the queue once entry is triggered. How can a certain "target-order" be assigned to an entry/a position please? Of course there might be the risk that the target is filled right before the entry, but lets forget this situation please.


    Is it enough to place a simple order in other direction with charttrader already before the entry? Or is it better to do it in a script-strategy and work with Iorders?



    Thank you!
    Tony

    #2
    Hello tonynt,

    If you are wanting to do this manually, you would need to submit individual orders in the order you want them submitted. For example, you could submit the target order of your choice and then enter a position. If you are using multiple entries and have more than 1 as the position, you would need to pay close attention to your orders as there is no way to tie a target to a future entry.

    In scripting with the managed approach and its orders / signal system, it would not be expecting this order of events so this would not be possible to link orders together and have this happen in that order. You can, however, use the unmanaged approach to submit various orders in whatever order you wish. Because you wouldnt be associating the orders by a signal name, you would instead use logic to control them how you wanted to.

    For this type of question, I would also suggest that you try this on your end for whichever area you are interested in (manual or scripted) to see what the result is. Testing hypothetical questions from your end is always suggested as you can see what the answer is directly that way. If the result you see from that test is not what you are expecting, you could provide that information as support for your questions surrounding that test.


    Please let me know if I may be of additional assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hello Jesse,


      thank you for your reply. I´m not sure if I understand your reply correctly when translating. So let me ask accurately concerning the script solution please: lets say we want to do an entry short and we want to bring in the target before the entry. And we only want to trade 1 contract (or n-contracts with all in-all out at target). Would the "target-order" from the script be a "normal" long entry or is it somehow a "target" or "exit" tied to the short-entry?


      And when I try to do with chart-trader (I have a working target long now) and I want to place a short entry then there appears the attached message.



      Thank you!
      Tony
      Attached Files
      Last edited by tonynt; 08-31-2018, 11:21 AM.

      Comment


        #4
        Hello tonynt,

        Correct you would need to use orders that are not associated with each other which would exclude using the SignalName/FromEntrySignal system and the Set methods for targets.

        From scripting, you would submit whichever order type is needed for the target and whichever order is needed for the corresponding entry. Your logic would be what ties these orders together as you are doing the order of events backward from what the platform does normally. The unmanaged approach is generally used for these type of cases to avoid any situations that may arise from the managed approach and its order handling rules.



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

        Comment


          #5
          Hello Jesse,


          thank you for your reply. I´m getting more confused. I understood from your reply that the orders are not associated with each other. Then you write "..what ties these orders together...". Are the target order (which is placed before the entry order) and the entry order accociated or tied or not. I admit that this confusion is on my end with translating to understand but one time "not associated" and then "tied" I have a problem to understand.


          Thank you for clearifying.


          Best regards
          Tony

          Comment


            #6
            Hello tonynt,

            These orders are not tied together in any way they are just two orders.

            To put this simply, the platform is not going to do what you are asking on its own while using signal names and the managed approach. Your logic is what will be needed to control the order that you submit these orders in.

            The existing systems that "tie" or "associate" orders together do not work backward like this. The SignalName system would try to look for an entry when using Exit orders, this is the error you provided an image of. Target orders using the Set methods would do the same except they would submit after an entry filled when using a signal name. This leaves using orders alone that are not tied together.

            In general, when you are trying to do something that is not what the standard order system does already you will very likely need to use single unassociated orders or the unmanaged approach. You can then use logic to reach your goal rather than relying on signal names and internal order handling rules.


            Please let me know if I may be of additional assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              Hello Jesse,

              thank you for your explanation. Let me do another question referring my idea please: is it possible to work with the position in the queue? Lets say I make an entry limit long 5 ticks below current price. When this enterlonglimit is eg below 100 in the queue of orders then I place a marketentry short. Can I refer to the position of my order in the queue somehow?

              As I have 3rd party indicators showing the position of a target-order in the queue I assume this must be possible to work with in a script as well.

              Thank you!
              Tony
              Last edited by tonynt; 08-31-2018, 01:07 PM. Reason: clearifying

              Comment


                #8
                Hello tonynt,

                The queue position would not be something you can directly access through the market data events provided through NinjaScript. You could see the APQ column for the superdom in NT8 to get an idea of what would be required to estimate your average queue position. Third parties that offer this feature are likely doing something similar to estimate the position.



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

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Christopher_R, Today, 12:29 AM
                0 responses
                10 views
                0 likes
                Last Post Christopher_R  
                Started by sidlercom80, 10-28-2023, 08:49 AM
                166 responses
                2,235 views
                0 likes
                Last Post sidlercom80  
                Started by thread, Yesterday, 11:58 PM
                0 responses
                3 views
                0 likes
                Last Post thread
                by thread
                 
                Started by jclose, Yesterday, 09:37 PM
                0 responses
                8 views
                0 likes
                Last Post jclose
                by jclose
                 
                Started by WeyldFalcon, 08-07-2020, 06:13 AM
                10 responses
                1,415 views
                0 likes
                Last Post Traderontheroad  
                Working...
                X