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

Order Management

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

    Order Management

    For EOD backtesting I would like to place stop orders at the end of each day which are valid for the next day only. How can I do this?

    If my understanding is right, EnterLongStop() is cancled at the end of the current bar, in which it is called?

    Best Regards

    Thomas

    #2
    Hello,
    Thanks for your post.

    Yes you are right to say that orders are cancelled at the end of the current bar, although you can override that condition by using the following overload.

    Code:
    ExitLongStop(int barsInProgressIndex, bool liveUntilCancelled, int quantity, double stopPrice, string signalName, string fromEntrySignal)
    You can get more details from here http://www.ninjatrader.com/support/h...itlongstop.htm

    But please do note, using this overload the order will be valid till it gets filled. So you have to do a custom check, and cancel any unfilled order.

    Please let me know if I can assist you any further.
    JoydeepNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by tsantospinto, 04-12-2024, 07:04 PM
    4 responses
    61 views
    0 likes
    Last Post aligator  
    Started by michi08, 10-05-2018, 09:31 AM
    3 responses
    740 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by sightcareclickhere, Today, 01:55 PM
    0 responses
    1 view
    0 likes
    Last Post sightcareclickhere  
    Started by Mindset, 05-06-2023, 09:03 PM
    9 responses
    259 views
    0 likes
    Last Post ender_wiggum  
    Started by Mizzouman1, Today, 07:35 AM
    4 responses
    18 views
    0 likes
    Last Post Mizzouman1  
    Working...
    X