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

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 aa731, Today, 02:54 AM
    0 responses
    4 views
    0 likes
    Last Post aa731
    by aa731
     
    Started by thanajo, 05-04-2021, 02:11 AM
    3 responses
    470 views
    0 likes
    Last Post tradingnasdaqprueba  
    Started by Christopher_R, Today, 12:29 AM
    0 responses
    10 views
    0 likes
    Last Post Christopher_R  
    Started by sidlercom80, 10-28-2023, 08:49 AM
    166 responses
    2,237 views
    0 likes
    Last Post sidlercom80  
    Started by thread, Yesterday, 11:58 PM
    0 responses
    4 views
    0 likes
    Last Post thread
    by thread
     
    Working...
    X