View Full Version : Trailing stops with Strategy Wizard
rhobbo1
12-26-2007, 12:05 PM
I'm having trouble setting an initial stop for an entry in the Strategy Wizard.
I want to place a stop at the low -1 tick of the entry bar for long entries and at the high of the entry bar +1 tick for short entries.
Also...
I want to trail a stop loss after entry.
For longs trail a stop at the low of the 3rd last bar -1 tick but excluding inside bars.
For Shorts trail a stop at the high of the 3rd last bar +1 tick also excluding inside bars.
Thanking you in advance...
NinjaTrader_Josh
12-26-2007, 12:34 PM
Hi rhobbo1,
For the more intricate stops you have outlined you will probably want to unlock the strategy and manually type them in. What you want to do is make sure your Long and your Short orders have different string IDs. Then you want to submit Stop/Trail Stop orders that are linked to those IDs. Because you seem to want to use price as the measure of where you want your stops to be placed you will need to use CalculationMode.Price for them.
http://www.ninjatrader-support.com/HelpGuideV6/SetStopLoss.html
http://www.ninjatrader-support.com/HelpGuideV6/helpguide.html?SetTrailStop
rhobbo1
12-26-2007, 01:10 PM
Thanks for the prompt reply Josh!
Well looks like I'm gonna have to learn C# or the ninja script huh!!
Where's the best place for a newbie to start... in your opinion?
I like to learn from video tutorials!!
Thanks Josh
NinjaTrader_Josh
12-26-2007, 01:25 PM
Probably the best place to start is just to look at some of the reference samples available here: http://www.ninjatrader-support.com/vb/forumdisplay.php?f=30
Other resource you can try for getting your strategy made is our NinjaScript Consultants. http://www.ninjatrader.com/webnew/partners_onlinetrading_NinjaScript.htm
fx793
01-05-2008, 02:46 PM
Hello Everyone,
I'm a little new to Ninjatrader. Can someone please explain how to use the "Ticks" option when using the Trailing stop? What exactly is happening if I enter 20 Ticks for example? I understand Percent and Price, but not ticks. The support guide does not really translate how to use the "Ticks" option.
Also, while using the trailing stop "Ticks" option with Daily data for Forex and other Futures and Stocks, I have noticed the backtest results do not display a legitimate time for the trailing stop exit. For instance I enter at 12 AM and then exit at 12AM (same day) with a 50 point gain??
Thanks!
Doug
NinjaTrader_Josh
01-05-2008, 03:03 PM
Using ticks is based on an offset from your entry price. If you set it to 20 ticks it will base its initial stop at 20 ticks from entry price and adjust accordingly.
When using a backtest on daily bars, you will enter a trade at 12am. If during that bar your stop would have been hit you will be filled for an exit. Since we cannot "peak" inside the bar to see what time/price you would have actually been filled at we just fill you at your stop price.
fx793
01-05-2008, 03:28 PM
Hi Josh,
Thanks for your reply. To understand more clearly, the Tick stop is not the # of Tick bars but Pips (for Forex)? Can I assume I would see more accurate backtests the smaller the time frame I 'm using? In your opinion is there any validity in using the Daily bars with the Tick based trailing stop for backtesting purposes?
For example, .02 Ticks would be 2 pip stop?
NinjaTrader_Josh
01-05-2008, 04:17 PM
On forex the ticks would work as pips. You would input it in whole numbers. I believe a 2 tick stop would be a 2 pip stop.
You may still find backtesting on daily bars useful, but that is up to you to decide. Here is an article that may shed some more light on backtesting.
http://www.ninjatrader-support.com/HelpGuideV6/helpguide.html?DiscrepanciesReal-TimeVsBacktest