![]() |
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
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Mar 2012
Posts: 30
Thanks: 7
Thanked 0 times in 0 posts
|
I recently completed a strategy using the NT7 strategy wizard. I am very inexperienced in coding but I am happy with the outcome of this strategy. I have been looking on this site for suggestions on some way to change the order quantity according to account size. I am trading Futures contracts, and I am hoping to find some way to have the script get the account size, divide by 5000, and then round down to nearest whole number in order to allow $5000+ of margin per contract trading. I would also like it to update after each trade. Is there a good way to do this?
Thanks. --Adam. |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
|
Hello Adam,
Welcome to the forum and I am happy to assist you. Unfortunately the strategy is for coding simple ideas. If you want to code a account size like you described, you have to unlock your code and edit it further in the NinjaScript editor. The GetAccountValue function will get you the account value and once you have it you can simply divide it with the margin amount. Please refer here for more on GetAccountValue http://www.ninjatrader.com/support/h...countvalue.htm You can check the values in the OnExection event for any updates after each trades http://www.ninjatrader.com/support/h...nexecution.htm Please let me know if I can assist you any further.
Joydeep M.
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Mar 2012
Posts: 30
Thanks: 7
Thanked 0 times in 0 posts
|
Thanks for the help, I'll see what I can do with that.
|
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Dec 2011
Location: India
Posts: 3,286
Thanks: 580
Thanked 546 times in 541 posts
|
Hello Adam,
Thanks for your note. Please let me know if I can assist you any further.
Joydeep M.
NinjaTrader Customer Service |
|
|
|
![]() |
| Tags |
| account size, order entry |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Set Entry Size Based on Current Account Size | Anagoge | Strategy Analyzer | 4 | 09-30-2010 04:57 AM |
| Trade based off of Sim account size | shazzmoe | Strategy Analyzer | 3 | 08-04-2010 04:59 PM |
| Please add Bid size, Ask size, Last size to Market Analyzer | Profitmake | Version 7 Beta General Questions & Bug Reports | 3 | 05-26-2010 09:21 AM |
| Recalculating position size based on account size, % risked and stop loss | clivehunt | Strategy Development | 18 | 03-22-2009 11:25 AM |
| position sizing using account size | bkout | Automated Trading | 1 | 03-12-2009 06:04 AM |