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

How to ad code to cancel a limit order after X seconds or X bars?

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

    How to ad code to cancel a limit order after X seconds or X bars?

    If I have:

    EnterLongLimit(DefaultQuantity, 0, "buyLIMITmkt")

    How to I instruct it to cancel the limit order after X seconds or X bars?

    Where do I put this addl code as well?

    Greg

    #2
    Originally posted by birdog View Post
    If I have:

    EnterLongLimit(DefaultQuantity, 0, "buyLIMITmkt")

    How to I instruct it to cancel the limit order after X seconds or X bars?

    Where do I put this addl code as well?

    Greg
    You will have to record your time and bar of entry, and then cancel the order when you want to.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by nightstalker, Today, 01:32 PM
    0 responses
    1 view
    0 likes
    Last Post nightstalker  
    Started by NTCalmPersistence15, Today, 10:03 AM
    1 response
    10 views
    0 likes
    Last Post NinjaTrader_ChristopherJ  
    Started by DawnTreader, 05-08-2024, 05:58 PM
    13 responses
    45 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by jpeep, 08-16-2020, 08:31 AM
    15 responses
    497 views
    0 likes
    Last Post notenufftime  
    Started by ldanenberg, Yesterday, 03:19 PM
    2 responses
    12 views
    0 likes
    Last Post ldanenberg  
    Working...
    X