Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Change or cancel a limit order generated by SetProfitTarget

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

    Change or cancel a limit order generated by SetProfitTarget

    Hi, (first sorry for my defficient english)

    I've differents orders conditions with differents SetProfitsTarget included in OnBarUpdate method. How can I cancel the limit orders generated by SetProfitTarget that I don't want execute, or move the first target order to another price calculated?

    Thanks.

    #2
    omares,

    Unfortunately you cannot cancel them, but to move them you could just resubmit the Set() method again at the new price. Please see an example of this here: http://www.ninjatrader-support2.com/...ead.php?t=3222
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      thanks Josh,
      but then, if I want do something like this in OnBarUpdate method:

      1. Condition A is True, then EnterLong (market) with a Target objective (Limit)
      2. Condition B is True, then EnterShort (market) with a Target objective (Limit)

      then :

      3. Condition C is True, and add another EnterLong(market) with different quantity of lots and with a new Target objective (Limit) that must cancel or modify the last Target objective(Limit) working with new lots and new price.

      4. Condition C can repeat another times with new entries.
      5. .....

      How can I do this? I've tried with differents SetProfitTarget, with ExitLongLimit and ExitShortLimit, but I don't have the solution (surely because I don't know programming very well).

      Thanks again for your attention.

      Comment


        #4
        omares,

        If you want to have a bunch of different targets you will need to give each scale in a unique signal name and tie unique Set() methods to each one by calling those specific signal names for the fromEntrySignal parameter.

        Please also remember to bump up your EntriesPerDirection setting to be able to scale in multiple times.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        653 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
        574 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        577 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X