Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

TP/LimitOrders get cancelled by Ninja

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

    TP/LimitOrders get cancelled by Ninja

    Hello

    I use a simple strategy in managed mode:
    I use EnterLong/EnterShort with a qty of 2.

    I d like the first TP to be reached after 10 ticks, the 2nd one is based on the countersignal of the entry.

    Problem is: my TP order gets cancelled (Here an example of a short trade with a buy limit that gets cancelled with TraceOrders switched on):
    Cancelled expired order: BarsInProgress=0: Order='NT-00007/Backtest' Name='SyExit' State=Working Instrument='CL 06-14' Action=BuyToCover Limit price=100.19 Stop price=0 Quantity=1 Strategy='BunnyHopp888' Type=Limit Tif=Gtc Oco='' Filled=0 Fill price=0 Token='7c9b83de51b64fb6b3a1ee758de84656' Gtd='01.12.2099 00:00:00'

    The cancellation happens 2-3 minutes after my buyLimit(TP) order was sent.

    Would you know a way to make the TP not get cancelled?

    Thanks
    Michael

    #2
    Hello Michael,

    Thank you for your post.

    You will need to set the liveUntilCancelled bool to true in the Exit() method used for your Profit Target. The syntax for ExitLongLimit() and ExitShortLimit() with the bool included are below:
    • ExitLongLimit(int barsInProgressIndex, bool liveUntilCancelled, int quantity, double limitPrice, string signalName, string fromEntrySignal)
    • ExitShortLimit(int barsInProgressIndex, bool liveUntilCancelled, int quantity, double limitPrice, string signalName, string fromEntrySignal)

    For information on these methods please visit the following link: http://www.ninjatrader.com/support/h...d_approach.htm

    Please let me know if I may be of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by futtrader, 04-21-2024, 01:50 AM
    4 responses
    41 views
    0 likes
    Last Post futtrader  
    Started by Option Whisperer, Today, 09:55 AM
    1 response
    11 views
    0 likes
    Last Post bltdavid  
    Started by port119, Today, 02:43 PM
    0 responses
    3 views
    0 likes
    Last Post port119
    by port119
     
    Started by Philippe56140, Today, 02:35 PM
    0 responses
    4 views
    0 likes
    Last Post Philippe56140  
    Started by 00nevest, Today, 02:27 PM
    0 responses
    2 views
    0 likes
    Last Post 00nevest  
    Working...
    X