NinjaTrader Support Forum  
X

Attention!

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


Go Back   NinjaTrader Support Forum > Application Technical Support > Automated Trading

Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader.

Reply
 
Thread Tools Display Modes
Old 09-29-2009, 04:22 PM   #1
shodson
Member
 
Join Date: May 2009
Posts: 81
Thanks: 1
Thanked 0 times in 0 posts
Default Cancelling a backtest during optimization

How can I conditionally cancel one of the backtests performed during optimization?

For example, I have 2 parameters I want to optimize on: PT (profit target) and SL (stop loss). And let's say I want to run an optimization with PT from 10-100 and SL from 10-100 and optimize for max profit. However, I don't want any backtests run where SL > PT because I don't like strategies that have a risk-to-reward ratio > 1. Also, this will speed up my optimizations as it doesn't bother backtesting scenarios in that condition. How would I accomplish this in code?
shodson is offline  
Reply With Quote
Old 09-30-2009, 06:10 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,384
Thanks: 252
Thanked 967 times in 950 posts
Default

shodson, unfortunately this is not directly supported - as a workaround I would create an input parameter for your needed combinations of target and stop and then optimize this instead of the two individual values.
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
Backtest/Optimization/Walk-Forward Default Parameter Settings Shogun SunTzu Strategy Analyzer 4 10-12-2010 05:15 AM
Cancelling orders once placed TiggerTrader Strategy Development 5 09-18-2009 07:28 AM
Orders not cancelling... BigDog008 Strategy Development 14 06-15-2009 12:42 PM
Cancelling out position mick3456 Miscellaneous Support 1 09-06-2008 08:04 PM
Cancelling all Orders PolePosition General Programming 7 05-22-2008 03:31 AM


All times are GMT -6. The time now is 06:56 PM.