![]() |
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: Jun 2008
Posts: 1
Thanks: 0
Thanked 0 times in 0 posts
|
Hi,
I've been trying to backtest SetTrailStop(), but I have not been able to get it to work. I am using TD ameritrade backtest data (minute only). Any tips? Here's the basic test code: protected override void Initialize() { SetTrailStop("EnterLong",CalculationMode.Percent,S top,true); CalculateOnBarClose = true; } /// <summary> /// Called on each bar update event (incoming tick) /// </summary> protected override void OnBarUpdate() { if (CCI(14)[0] > MainEntryCriteria && Rising(this.TEMA(20))) { EnterLong(DefaultQuantity, "EnterLong"); } } |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Please debug your strategy as per here:
http://www.ninjatrader-support.com/v...ead.php?t=3418 http://www.ninjatrader-support.com/v...ead.php?t=3627
Dierk
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to monitor SetTrailStop | toyogo00 | Strategy Development | 3 | 07-22-2008 12:41 AM |
| Unable to cancel backtest | zoltran | Historical NinjaTrader 6.5 Beta Threads | 5 | 03-31-2008 09:52 AM |
| Commissions in SA Backtest not working? | ThePatientOne | Strategy Analyzer | 7 | 10-22-2007 01:13 PM |
| SetTrailStop() | funk101 | Strategy Development | 1 | 04-04-2007 03:39 AM |
| SetTrailStop() | funk101 | Strategy Development | 8 | 03-27-2007 07:42 AM |