NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


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 02-18-2010, 04:29 AM   #1
cicondo
Member
 
Join Date: Oct 2007
Posts: 49
Thanks: 0
Thanked 0 times in 0 posts
Default Amending quantities of a target position

Dear customer service....

I have developed an auto system trader that handles up to 3 different targets and is able to manage one runner position additionally.
But I if the first target gets hit the quantity of all the open targets will be
changed to the remaining position size. I have no idea form where the amending process will be executed. I have debugged the OnExecution, OnOrderUpdate Method as well but there is no line of code that changes the quantity size
of the remaining target orders.

Please see the attachement of my OrderManagement-class. It's separated from the strategy file, and each Barupdate, OrderUpdate and so on is delegated through the stragtey.

Maybe you see my fault.
Attached Images
File Type: png before_t1.png (22.0 KB, 4 views)
File Type: png after_t1.png (18.9 KB, 5 views)
Attached Files
File Type: cs _BWTOrderManagement.cs (29.3 KB, 4 views)
cicondo is offline  
Reply With Quote
Old 02-18-2010, 05:57 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
Default

cicondo, please run your script with TraceOrders 'true' in the Initialize() so you can check into orders placed / executed as the first target is hit and your qty's change unexpectedly.

This will give you debug details for all order methods used displayed in the output window (Control Center > Tools > Output window).

http://www.ninjatrader-support.com/H...aceOrders.html
NinjaTrader_Bertrand 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
How to set profit target for part of position? Trader61 Strategy Analyzer 1 11-08-2009 06:21 PM
Amending OHLC data Mindset Charting 2 06-02-2009 10:14 AM
Profit target for all position. Czarek Strategy Development 11 08-22-2008 12:23 AM
Partial position off at one target, then autotrail for balance? MarkB ATM Strategies (Discretionary Trading) 5 12-13-2006 11:00 AM
Amending automated orders manually via Ninja jonno Automated Trading 1 01-05-2005 08:18 AM


All times are GMT -6. The time now is 10:40 PM.