Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Stop lost orders mapping entry orders

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

    Stop lost orders mapping entry orders

    Hi,

    I posted my question before for how to control entry orders--- stop lost orders mapping.
    Reference please click this. Last post answer is FIFO.

    I notice that I can control my order entry-stop lost orders mapping using ATM.(by setup KeepSelectedAtmStrategyTemplateOnOrderSubmission)

    Control means, I can entry multiple orders, I can control my entry orders using which one stop lost to stop my orders. They can handle each entry order independent.

    How can I make it working by my strategy. What is the Principle and Method ?

    Many thanks,

    #2
    Hello thomson,

    Instead of using the Unmanaged Approach in your strategy you would have to use the ATM Strategy methods to do this.

    Then you may be able to control each one of them by the "ATMStrategyID" which you would have to create a unique id for each one.

    We have an example of this built into NinjaTrader that you may view by going to Tools -> Edit NinjaScript -> Strategies -> SampleAtmStrategy.

    Let me know if you have any questions.
    JCNinjaTrader Customer Service

    Comment


      #3
      Thanks JC, could you please give me any suggestion for create similar function using Unmanaged Approach?
      How it is working at ATM.

      Many thanks,
      T

      Comment


        #4
        Hello T,

        NinjaTrader has some under-the-hood handling for ATM Strategy orders which helps tie them together which is why you can do this with ATM Strategies. Using the Unmanaged Approach you have the freedom of submitting orders in almost any way that you would like but that added under-the-hood handling will not effect it so NinjaTrader will tie the order together differently.

        To see if there are any other options that you may try can you give me an example of what you would like to see and what is happening?
        JCNinjaTrader Customer Service

        Comment


          #5
          Thanks JC.
          I want to create a strategy which can handle multiple entry orders independent. Eg. I can entry long orders by condition one, two, three,... At the same time, each entry orders have stop lost order by themself. we call sl1,sl2,sl3,...
          If the price meet sl2, the entry2 will get rid of by my orderList.

          Please advise me how can I handle these scenario like ATM by unmanaged code.

          May thanks.
          T

          Comment


            #6
            Hello T,

            Could you clarify more on what your "orderList" is?
            JCNinjaTrader Customer Service

            Comment


              #7
              Code as below,

              List<IOrder> orderList= new List<IOrder>();
              orderList.Add(Entry1); --- if entry1 have.,...

              Thanks,
              T

              Comment


                #8
                Hello T,

                Removing it from a List is more of a C# code.

                You should be able to do this inside of the OnExecution() method, and check to see if "sl2" is Filled and then use the "RemoteAt()" Method to remove an element at a specific point.

                Represents a strongly typed list of objects that can be accessed by index. Provides methods to search, sort, and manipulate lists.
                JCNinjaTrader Customer Service

                Comment


                  #9
                  Thanks JC, I have some experience using c#.
                  I want to know the mechanism of multiple orders handle using unmanaged code. Something like using fromEntrySignal handle stop lost and target orders in unmanaged code.

                  Thanks
                  T

                  Comment


                    #10
                    There is no order handling unamanged code. The unmanaged approach is using direct calls to Submit, Change or Cancel an order. You will have to design your own order handing for multiple orders using unmanaged code.
                    MatthewNinjaTrader Product Management

                    Comment


                      #11
                      Could you please give me any description about how is fromEntrySignal working?
                      How to create the relation of entryOrder and stop lost/target using fromEntrySignal. I mean how to handle it by logic workflow(code logic create relation). It is not the command how to use it.

                      Thanks,
                      T

                      Comment


                        #12
                        Hello T,

                        The "fromEntrySignal" would be defining the order in which you want it to Exit meaning that the Exit order will only fire if there is the "EntrySignal" filled with that name.

                        You would not have to create an entryOrder/IOrder for this you would just have to define a "signalName" for each of your Entry order so that you can define your exit for them manually.

                        Here is a sample that scales out of a position by "signalName" that may help give you a better understanding of this.
                        JCNinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by techgetgame, Today, 11:42 PM
                        0 responses
                        6 views
                        0 likes
                        Last Post techgetgame  
                        Started by sephichapdson, Today, 11:36 PM
                        0 responses
                        1 view
                        0 likes
                        Last Post sephichapdson  
                        Started by bortz, 11-06-2023, 08:04 AM
                        47 responses
                        1,612 views
                        0 likes
                        Last Post aligator  
                        Started by jaybedreamin, Today, 05:56 PM
                        0 responses
                        9 views
                        0 likes
                        Last Post jaybedreamin  
                        Started by DJ888, 04-16-2024, 06:09 PM
                        6 responses
                        19 views
                        0 likes
                        Last Post DJ888
                        by DJ888
                         
                        Working...
                        X