NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 04-28-2009, 09:38 AM   #1
zweistein
Senior Member
 
Join Date: Jan 2009
Posts: 584
Thanks: 2
Thanked 21 times in 12 posts
Default how to simulate/test partial fill

Hello,


Sometimes during trading I see a good occasion and I enter a position by hand via SuperDom.
I could then have an ATM strategy attached to it, but frankly speaking the ATM strategies are much too limited and cannot reflect my position managment ideas properly.
I could also sit in front of the PC and follow the position by hand. Very boring and why should I use NT then.

So I am thinking of writing a normal trading strategy instead of an ATM strategy (lets call LongFollowUp) where I can codewise realise everything I want, but there is one problem:
The position was not opened from within the strategy and Strategy Position and account position will always be out of sync.

Basically one has to programm the Position offset into the strategy, e.g.
the (LongFollowUp) strategy starts immediately with a EnterShortStop() to set a Stop Loss and once Strategy Position is short the strategy has finished its work. For example a function PositionsExitOnClose() cannot rely on the default behaviour and must be rewritten and one must be sure to leave the strategy with a short position in the end.

Well, all working fine and my testing is OK, but I do not know how to properly test the strategy for partial fills and for rejected orders for example.

Is the a possibility to configure the simulated account Sim101 in such a way that orders are partially filled or rejected?


Andreas

P.S.

Someone has a better Idea how to implement a LongFollowUp strategy except for waiting for NT7 where we still don't even know the features and hope in a much improved ATM solution.
I am happy to receive ideas!
zweistein is offline  
Reply With Quote
Old 04-28-2009, 09:44 AM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
Default

Tools->Options->Enforce partial fills. Check that box.
NinjaTrader_Josh is offline  
Reply With Quote
Old 04-28-2009, 09:52 AM   #3
zweistein
Senior Member
 
Join Date: Jan 2009
Posts: 584
Thanks: 2
Thanked 21 times in 12 posts
Default

thank you

andreas
zweistein is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ameritrade - Partial Fill zinkr Connecting 8 09-02-2009 01:08 PM
Partial fill nfeldberg Strategy Development 21 06-04-2009 08:55 AM
How to test partial fill xewoox General Programming 1 12-11-2008 06:08 AM
Simulate Partial fill ... with ease. ltemme Automated Trading 4 08-16-2008 10:04 AM
ATM cancels entry after partial fill Futures_Shark ATM Strategies (Discretionary Trading) 4 09-06-2007 04:47 PM


All times are GMT -6. The time now is 04:23 AM.