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 jc.am, Today, 07:59 PM
    1 response
    5 views
    0 likes
    Last Post NinjaTrader_EricB  
    Started by ybhx0315, Today, 09:06 PM
    0 responses
    6 views
    0 likes
    Last Post ybhx0315  
    Started by parkinsonbr, Today, 08:23 PM
    0 responses
    3 views
    0 likes
    Last Post parkinsonbr  
    Started by i2w8am9ii2, Today, 04:36 PM
    2 responses
    13 views
    0 likes
    Last Post i2w8am9ii2  
    Started by WeyldFalcon, Today, 02:07 PM
    2 responses
    16 views
    0 likes
    Last Post WeyldFalcon  
    Working...
    X