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 Shansen, 08-30-2019, 10:18 PM
    24 responses
    938 views
    0 likes
    Last Post spwizard  
    Started by Max238, Today, 01:28 AM
    0 responses
    3 views
    0 likes
    Last Post Max238
    by Max238
     
    Started by rocketman7, Today, 01:00 AM
    0 responses
    2 views
    0 likes
    Last Post rocketman7  
    Started by wzgy0920, 04-20-2024, 06:09 PM
    2 responses
    27 views
    0 likes
    Last Post wzgy0920  
    Started by wzgy0920, 02-22-2024, 01:11 AM
    5 responses
    32 views
    0 likes
    Last Post wzgy0920  
    Working...
    X