![]() |
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 |
|
Senior Member
Join Date: Aug 2009
Posts: 153
Thanks: 11
Thanked 5 times in 4 posts
|
Hi!
For money management reasons I want to stop my strategy if the ratio of winning and loosing trades during the last 30 days falls below X%. How can I do this? I can't find a way to use the strategy performance methods with a time property. /Regards |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
poseidon_sthlm,
Unfortunately there is no built in function for this. You will have to custom program your own.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Aug 2009
Posts: 153
Thanks: 11
Thanked 5 times in 4 posts
|
Ok, I got it. The key is to use the DateTime objekt TIME in the IExecution object returned by the trade property EXIT
Code:
Trade trade; trade.Exit.Time |
|
|
|
|
|
#4 |
|
Member
Join Date: Mar 2010
Posts: 30
Thanks: 0
Thanked 0 times in 0 posts
|
Hi poseidon_sthlm,
How are you checking the performance of the last 30 days. Are you checking if today's date is > 30 days ago and then applying your win/loss formula? Does it work for backtesting? -thx |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Compute Highest High between 9:30 AM and 10:30 AM | mgbloomfield | Indicator Development | 5 | 03-20-2013 04:26 PM |
| Maximum number of days for non-minute timeframe chart | RK_trader | Miscellaneous Support | 1 | 05-10-2008 09:50 PM |
| Exit on Close exited 30 Minutes Early (instead of 30 secs) | wayneFH | Strategy Development | 6 | 04-28-2008 04:52 AM |
| General Question about indicators on Min(x) charts over a number of days | Sidhartha | General Programming | 2 | 04-10-2008 08:01 AM |
| $97.30 Sell-Stop Order Filled at $96.30! | davidfw1866 | ATM Strategies (Discretionary Trading) | 3 | 11-08-2007 06:43 AM |