Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

place a local stop at resident at the broker on reversals.

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

    place a local stop at resident at the broker on reversals.

    Hi:

    When placing an initial entry and stop on my strategy it works good. The stop is a order resident located at my broker (MBT) for one of my FOREX accounts. However, I have reversal actions that sometimes take place. When that action takes place, currently, I have a emergency stop and a trail stop that resides only within my strategy code and executes when those levels are hit.

    Upon reversals my hard stop is not present and resident on my broker account like it is with my initial entries.

    How do I make the reversals signals also place a actual stop (like the initial entries) as well? What is the easiest way to skin that cat?

    Right now, here is what I have for my reversals and thinking about adding that last line (which is now just a //note). Is that last line what I need to do or some other code here (or code somewhere else) to make it place a regular stop upon reversals?

    If ...xyz, then...
    Code:
    {
                        Print("Reverse BuyMkt"); 
                        EnterLong(DefaultQuantity, "Reverse BuyMkt");
                        //SetStopLoss("SellMkt", CalculationMode.Ticks, ShortStop, false);
    }
    Right now, my trail stop and emergency stop are only in my code (which is fine), but I want to add that hard stop on reversals too (like the initial entries that work ok) simply because IF I loose connection with the broker, internet issues, etc then I would have a broker resident stop in place so I would have a measure of protection there...

    Thanks folks!!!



    Greg

    #2
    I think at this point, you need to move beyond the Set methods and start tracking your orders using IOrder objects. That way you can say if "EntryA" is filled, place an ExitLongStop that is tied to EntryA, or when "Reversal" is filled, set an ExitLongStop that is tied to the reversal.

    You can use OnOrderUpdate and OnExeuction which should allow you to submit your protective orders as soon as the specific order has been filled.

    Please see our Reference Sample on this topic for more information:

    The OnOrderUpdate() and OnExecution() methods are reserved for experienced programmers. Instead of using Set() methods to submit stop-loss and profit target orders, you can submit and update them manually through the use of IOrder and IExecution objects in the OnOrderUpdate() and OnExecution() methods. The OnOrderUpdate()
    MatthewNinjaTrader Product Management

    Comment


      #3
      Matthew...thanks...I will look into this...

      However, for the moment, is there any other way that I could fulfill this as well?

      Comment


        #4
        If you want an actual order to be placed on the broker's servers, you muse use an ExitLongStop/ExitShortStop method. The SetStopLoss methods are convenience methods are easier to program, but they have limited functionality.
        MatthewNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

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