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

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 tkaboris, Today, 05:13 PM
        0 responses
        2 views
        0 likes
        Last Post tkaboris  
        Started by GussJ, 03-04-2020, 03:11 PM
        16 responses
        3,281 views
        0 likes
        Last Post Leafcutter  
        Started by WHICKED, Today, 12:45 PM
        2 responses
        19 views
        0 likes
        Last Post WHICKED
        by WHICKED
         
        Started by Tim-c, Today, 02:10 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by Taddypole, Today, 02:47 PM
        0 responses
        5 views
        0 likes
        Last Post Taddypole  
        Working...
        X