Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Market Order if Limit not filled by certain time

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

    Market Order if Limit not filled by certain time

    Hi need some help. I'm trying to enter and exit the market with a limit order but have my system enter or exit the market if the limit order is not filled by the next bar. Thanks for your help!

    Also my system is in the market all the time so the order would need to be to reverse the position essentially. Thanks

    #2
    Hello prescottbph,

    Thanks for opening the thread.

    I have created a demonstration video describing how part of this behavior can be modeled using the Strategy Builder. Keep in mind that the Strategy Builder is only intended for creation of simple strategies, and any more robust behavior will have to be programmed in by unlocking the code.

    It is our expectation of our clients that when they unlock the code, they already have a programming background and understand how they can write the proper syntax and logic. As we are a small team, we are not equipped to create, write or debug client code. If you are looking for those services, I can have a member of our business development team reach out to you with more information on NinjaScript Consultants who would be happy to write the code for you.

    If you would like to reverse your position, you could call EnterShort() when in a Long position and EnterLong() when in a Short position. Since a strategy's position is separate from the Account position, entering from a a flat position must be minded.

    Limit orders will be valid for the bar it is submitted and will no longer be valid on the next bar iteration unless that order method is called again. This is detailed in the LiveUntilCancelled section of the help guide for the Managed Approach.

    Demo: https://www.screencast.com/t/8VZuUZSMWf

    Managed Approach - https://ninjatrader.com/support/help...d_approach.htm

    LiveUntilCanceled (ignored in the Strategy Builder.) - https://ninjatrader.com/support/help...ancelledOrders

    Strategy Builder 301 - https://www.youtube.com/watch?v=HCyt90GAs9k

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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Franck Z, Today, 09:49 AM
    0 responses
    4 views
    0 likes
    Last Post Franck Z  
    Started by pvtrader, Today, 08:02 AM
    2 responses
    7 views
    0 likes
    Last Post pvtrader  
    Started by Natoc, Today, 03:04 AM
    1 response
    17 views
    0 likes
    Last Post NinjaTrader_Jason  
    Started by Rudy2323, Today, 02:56 AM
    2 responses
    26 views
    0 likes
    Last Post Rudy2323  
    Started by tonynt, Yesterday, 02:07 PM
    1 response
    34 views
    0 likes
    Last Post NinjaTrader_Jason  
    Working...
    X