Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

converting indicator to strategy

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

    #31
    I am not sure what you mean by "turning them on". Do you mean just expanding them so you see the options available?
    Josh P.NinjaTrader Customer Service

    Comment


      #32
      converting indicator to strategy - reversing

      "advanced options" problem was ****pit error.

      Comment


        #33
        converting indicator to strategy - reversing

        Can't figure out how to get the order information about the reversed trades. The original order id seems gone.

        Comment


          #34
          Please check to ensure you are not clearing out the atmStrategyId variable.
          Josh P.NinjaTrader Customer Service

          Comment


            #35
            converting indicator to strategy - reversing

            Thanks. i will give that a try.

            Comment


              #36
              converting indicator to strategy - reversing

              I really apologize for these newbie detail questions and thank you for your patience.

              I can get the DOM to handle multiple reverses, but depending on slippage, I may need to be able to adjust targets. If I do not clear orderId when status is Filled, it hangs around, but it always has the same fill price, namely the fill price of the first trade of the series. How do I get the latest fill price? The answer to that I think will give a handle to move the target accordingly.

              Comment


                #37
                Hello roland_nt,

                To get fill prices, you can use these:



                These are the only two methods to expose fill prices. You will have to manually keep track of any values you'd like using these.
                Ryan M.NinjaTrader Customer Service

                Comment


                  #38
                  converting indicator to strategy - reversing

                  Ryan:
                  I have been using the method calls you indicate.
                  The problem I am having is getting the average fill price on the REVERSE position when the ATM strategy on the DOM has the option "Reverse at Target" checked. That price should be something close to the target that the ATM strategy on the DOM had set up.
                  Instead, I am getting the fill price of the first part of the trade. That same order ID continues to show the fill price of the first trade when the reverse portion is currently in the market and continues to show the first trade fill for every successive reverse..
                  I don't think this is a system error.
                  Rather it's about the question: what is the code to access the fill price of the automatic reverse?

                  Comment


                    #39
                    I see- Thanks for the clarification. I'll look into this scenario a little more and reply back to this thread tomorrow, Sunday.
                    Ryan M.NinjaTrader Customer Service

                    Comment


                      #40
                      The issue with reverse at stop and reverse at target is that these methods require the atm strategy to reach a flat state before resetting string values.

                      Since your position alternates between long and short, you'll need a different approach for resetting the string with each new trade. Maybe work from the fill state on your target orders for this.
                      Ryan M.NinjaTrader Customer Service

                      Comment


                        #41
                        converting indicator to strategy - reversing

                        I need a little more detail. Still not quite following.
                        I certainly can use GetAtmStrategyStopTargetOrderStatus("TARGET1", "idValue"), keep watching and wait for a fill on the auto reverse that would occur from the "Reverse at Target" checkbox on the superDom' advance options.
                        That would let me know that the reverse has occurred and also tell me the price of both the closed out portion and as well as the new open position.
                        But i am now back to the original problem stated many posts ago - namely, how do I adjust the new target for the newly opened portion. How do I get at its order ID

                        Comment


                          #42
                          Unfortunately I'm not sure the exact approach needed. The ATM methods for retrieving fill prices and status are dependent on the ATM strategy reaching a flat state. I'll have someone review this thread and reply Monday.
                          Ryan M.NinjaTrader Customer Service

                          Comment


                            #43
                            converting indicator to strategy - reversing

                            Thanks for your continued efforts. Just to be sure that I am clear about
                            my question here is a sample long entry series:

                            Entry1 LONG, orderId1 --->target1 and reverse SHORT using orderid2 --->
                            target2 and reverse LONG using orderid3----> target3 and reverse SHORT etc. etc.

                            I have the ATMstrategy on the superdom set to "Reverse at target".

                            How do I change (make minor adjustments to) target 2 and 3
                            which means, I presume, how do I get values for orderId2 and orderid3
                            so that I can use ATMStrategyChangeStopTarget()?

                            It is a guess on my part that there is an "orderid2" and "orderid3"
                            somehow generated in the internals that I might use since, clearly,
                            the superdom behaves quite happily with these successive reverses.
                            I know nothing about the internals to confirm the existence of
                            these addition orderIds. so in my explanation I am talking conceptually
                            when I request "a way to get at the (presumed) successive orderIds."

                            In the end my question boils down to - Is there a way,
                            by whatever means (undocumented or not), to adjust the
                            various targets along the way if the ATMstrategy is set to "reverse on Target"
                            If the answer is NO, NT only allows price control of the first leg
                            of an ATM strategy, then i need guidance on a workaround.
                            If the answer is YES, then I need an explicit 5 or 6 line code snippet outline,
                            because the help files do not cover this case.

                            Comment


                              #44
                              Roland, I'm not sure which orderID you refer to here, for working with the AtmStrategyChangeStopTarget() you would work only with the atmStrategyId to reference the strategy working, the individual 'legs' are changed by supplying the correct orderName for the one you wish to change...STOP1 or TARGET3 (capitals) - http://www.ninjatrader.com/support/h...stoptarget.htm

                              Comment


                                #45
                                converting indicator to strategy - reversing

                                Bertrand:
                                Thanks for the clarification. Let me play back to you what I now understand and see if I have it right. Please correct any remaining misunderstandings.
                                1)There is no way to find out the fill price of the first reverse or any subsequent reverse because orderId is not available for the reverses for use to check fill status with GetAtmStrategyEntryOrderStatus(orderId)
                                2)But I can change the stop or target on any of the reverses using STOP1 or TARGET3 in ATMStrategyChangeStopTarget()
                                3)The ATMstrategyID should not be made empty until all reverse at targets have been taken or a stop (no reverse) is hit

                                Question: is "STOP1" (or "TARGET3") a reserved word. meaning I can only use these exact characters or are they related to something else, for example, are the digits at the end of the words significant or is this parameter expected to appear in some previous (or subsequent) method invocation

                                Thanks again for your patience

                                Comment

                                Latest Posts

                                Collapse

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