Thanks,
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to cancel all working orders at the end of the day
Collapse
X
-
How to cancel all working orders at the end of the day
Hi, I have developed a strategy and now I have a problem: I want to make my strategy to close all working orders at the end of the day. I can put lines with <to time> but I didn't found any line with cancel all working orders if position is flat. Can somebody help?
Thanks,Tags: None
-
serman, there's unfortunately no 'flatten all' NinjaScript command for working orders. What you can do is either manually click on File > Flatten Everything when you're day is done or track the used IOrder objects for the day and CancelOrder them at a specific time if still placed - http://www.ninjatrader-support.com/H...ncelOrder.htmlBertrandNinjaTrader Customer Service
-
Originally posted by NinjaTrader_Bertrand View Postserman, there's unfortunately no 'flatten all' NinjaScript command for working orders.
Comment
-
Goldfly,
I found this undocumented method. I tested it and it essentially gets you flat, stops your strategies, and cancels all orders that are working regardless of which strategy has them out there.
I think it is the equivilent of the "Flatten Everything" menu command.
You are on your own, NT will not support this. Try at your own risk.
Please report your findings in the thread I am providing you.
Thanks,
Originally posted by goldfly View PostHmmmm, why not? You have a button in chart trader that closes your position and cancels any orders...... Couldn't Ninja expose a method that will run that routine for us?
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Haiasi, 04-25-2024, 06:53 PM
|
4 responses
54 views
0 likes
|
Last Post
by effraenk
Today, 02:15 AM
|
||
Started by ccbiasi, 11-23-2017, 06:06 AM
|
5 responses
2,199 views
0 likes
|
Last Post
by leodavis
Today, 02:11 AM
|
||
Started by kujista, Yesterday, 12:39 AM
|
2 responses
14 views
0 likes
|
Last Post
by kujista
Today, 02:02 AM
|
||
Started by Austiner87, Yesterday, 11:24 AM
|
2 responses
12 views
0 likes
|
Last Post Today, 01:42 AM | ||
Started by Rogers101, 05-05-2024, 11:30 AM
|
3 responses
21 views
0 likes
|
Last Post
by Rogers101
Today, 12:48 AM
|
Comment