![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Apr 2008
Posts: 12
Thanks: 0
Thanked 0 times in 0 posts
|
Hello,
I am trying to define the accountsize for a strategy but I am lost: I have put protected override void Initialize() { AccountSize = 5000; } to define the accountsize. So far so good. Now when I open a chart & add the strategy under "Order properties" it says set order quanity "by strategy". Now I have to change this manually to "by account size" which is not good when I have to do this many times over. Is there a way to have this done automatically so that orders are always handeled using the accountsize ? My order routine says: EnterLong(DefaultQuantity, "EnterLong1"); Is there a way to reference to the accountsize or somehow set the DefaultQuantity to the accountsize ? Thank you Martin |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
You will simply need to keep track of what your account size is and just submit orders that match your current account size. NinjaTrader does not currently access your true brokerage account size so you will need to adjust for that accordingly.
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Defining Default Chart Trader ATM | jeremymgp | ATM Strategies (Discretionary Trading) | 1 | 12-28-2007 09:19 AM |