CG
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Removing Executions
Collapse
X
-
Removing Executions
What steps must be taken when one runs a strategy where an execution needs to be removed, and a new one inserted? I get a memory exception noting that the executions I've been using are still in the memory space of the strategy. Must the strategy be completely removed, merely disabled, etc.?
CGTags: None
-
Seems more than that...I've disabled and removed the strategy (others are running on different instruments), and I still get the error that the executions in question are being used by a strategy in memory.Originally posted by NinjaTrader_Josh View Postcgeorgan,
Believe you will need to remove the strategy.
Comment
-
Not only that, but if you proceed to remove the strategies *then* restart NT, those executions (which happened to be from the prior day) have now disappeared and I can't even get to them any more to delete -Originally posted by NinjaTrader_Josh View Postcgeorgan,
Believe you will need to remove the strategy.
Again, there has to be a better way to do this -
Comment
-
Yes.Originally posted by NinjaTrader_Josh View Postcgeorgan,
Removing the strategy only opens the way to be able to remove the execution. Ultimately you would still need to wait for the .NET garbage collector to fully be done with the resources. Then you can remove the executions.
But you should note to people that if the execution comes at 11PM on 7/20, then I decide to restart NT at 8AM on 7/21 (so that the garbage collector can do its thing), all the executions from 7/20 disappear - so the attempt to remove executions from 7/20 become futile.
Comment
-
Actually, it doesn't appear to work at all.
I'm beginning to think that it's not possible to remove an execution:Originally posted by NinjaTrader_Josh View PostThanks. Added to our feedback list.
- Disabling a strategy (and restarting) does not allow you to remove an execution.
- Removing a strategy (and restarting) does not allow you to remove an execution.
- Removing any charts related to the instrument of the execution you're attempting to remove (and restarting) does not allow you to remove the execution.
- Doing all 3 of the above does not allow you to remove an execution.
So, how exactly does one remove an execution?
EDIT - Please don't say that you need to reset the accounts...as obviously that removes *all* executions.Last edited by cgeorgan; 07-22-2010, 02:55 PM.
Comment
-
cgeorgan,
1. Strategy places some trades during the day
2. You can see the executions in the Executions tab
3. Remove strategy from Strategies tab
4. Wait for .NET Garbage Collector to be done with these resources. Unfortunately there is no guarantee at what point in time the GC will decide to release these resources. To force a release you can restart NT.
5. Connect to data provider = see executions in Executions tab
6. Select execution, right click > Remove = execution goneJosh P.NinjaTrader Customer Service
Comment
-
I'm way out of my depth on this but have been playing with this in OnTermination():
GC.Collect();
GC.WaitForPendingFinalizers();
Print("Garbage Collected");
It doesn't seem to wind down the resources used by NT. Again, I'm a .Net newb so I may be totally off base, but forcing GC seemed like it was worth a shot.
Comment
-
Guys-Originally posted by NinjaTrader_Josh View PostUnfortunately forcing garbage collection is outside what I can intelligently comment on as well. This is not supported and I would not be able to comment on if it would/would not work either.
I would like to know if this procedure can actually be done in any of the NT 7 Builds past beta 16...I'm telling you, I am physically unable to delete *any* executions under *any* circumstances. I've tried all sorts of things.
All cynicism aside, at least one or two of the "tricks" I've tried to delete these executions should have worked. The fact that none did, whenever I've tried, tells me that there's likely some bug that found its way into NT7 that wasn't there prior to this.
PS I've followed the instructions you guys have provided as well and I still can't fix it. I hope you can understand my frustration; for days I've been attempting to gather decent portfolio trading statistics which get marred by bad executions which I cannot delete. I have to note for each day when this has happened, then back out those bad executions from my overall results.
Comment
-
Interesting Addition.
Guys-Originally posted by cgeorgan View PostGuys-
I would like to know if this procedure can actually be done in any of the NT 7 Builds past beta 16...I'm telling you, I am physically unable to delete *any* executions under *any* circumstances. I've tried all sorts of things.
All cynicism aside, at least one or two of the "tricks" I've tried to delete these executions should have worked. The fact that none did, whenever I've tried, tells me that there's likely some bug that found its way into NT7 that wasn't there prior to this.
PS I've followed the instructions you guys have provided as well and I still can't fix it. I hope you can understand my frustration; for days I've been attempting to gather decent portfolio trading statistics which get marred by bad executions which I cannot delete. I have to note for each day when this has happened, then back out those bad executions from my overall results.
Well, it turns out you can delete executions, just not the ones I want to delete. I was able to delete regular executions (though I had no reason to before).
On the other hand, I have an ongoing issue with "zero price fills", which I've discussed with Josh over there several times. Basically:
-In a short position with limit profit targets
-A "zero bid" comes from the data provider
-This zero bid triggers the limit profit target, which is then filled at a price of zero.
-This in turn causes problems with PnL, as it shows a contract short at XXX and covered at zero (i.e. "huge profits").
-It is not possible to delete these fills under any circumstances - hence what I've written you. Shutting down, repairing the DB, removing the strategy, restarting, in any order will not change this.
So somehow these zero-fills are stuck as some sort of "corrupted fill", exempt from being removed.
Comment
-
You guys can re-create this yourselves if you'd like...
Yes, these steps work for a regular execution - not for one of these zero fills.Originally posted by NinjaTrader_Josh View PostSteps in my post in #9 should be able to remove any execution done for today. Please send us your database with some zero price executions traded for today so we can try on our end.
Do you guys have DTN over there? Turn it on for the day with:
HG
SI
GC
NG
CL
You will get *at least* one zero priced bid update from them. If you want to recreate my error, simply create a basic strategy with a crossover entry (make sure it only creates short entries), that creates market stops and limit profit target bids on execution (make them far enough away so that you sit in the position for a while). This error will occur when you're short, as the zero bid will trigger your limit exit and fill it with a price of zero.
Then, go ahead and attempt to delete that zero price execution. You'll see exactly what I'm talking about.
That's as straightforward as I can get with this error, as I've witnessed it at least two dozen times now.Last edited by cgeorgan; 07-30-2010, 01:14 PM.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
626 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
359 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
105 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
562 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
567 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment