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 > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 11-06-2008, 10:58 AM   #1
Melcotran
Junior Member
 
Join Date: Oct 2008
Posts: 25
Thanks: 0
Thanked 0 times in 0 posts
Default Strategy doesn't work with stops and p targets.

My strategy seems to generate fine now and I can backtest it, but when I try to add stops and or profit targets it won't work. When I pull up a backtest menu and select my strategy the strategy window is blank. I'm sure it's the way I'm entering the stops and profit targets. What does "from entry signal" and "value" mean?
Melcotran is offline  
Reply With Quote
Old 11-06-2008, 11:19 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,411
Thanks: 252
Thanked 976 times in 959 posts
Default

Hi Melcotran,

Thanks for your post.

In the 'From Entry Signal' field you want to enter the signal name you attached to your Entry Signal.

In the 'value' field you want to enter the actual Profit Target / Stop Loss value associated with the 'mode' setting, either the price, a currency value or the tick amount.

Please review those two links below, they describe the SetProfitTarget() and SetStopLoss() methods -

http://www.ninjatrader-support.com/H...fitTarget.html

http://www.ninjatrader-support.com/H...tStopLoss.html





Quote:
Originally Posted by Melcotran View Post
My strategy seems to generate fine now and I can backtest it, but when I try to add stops and or profit targets it won't work. When I pull up a backtest menu and select my strategy the strategy window is blank. I'm sure it's the way I'm entering the stops and profit targets. What does "from entry signal" and "value" mean?
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 11-06-2008, 11:41 AM   #3
Melcotran
Junior Member
 
Join Date: Oct 2008
Posts: 25
Thanks: 0
Thanked 0 times in 0 posts
Default

How would I enter multiple targets for a single position? For example: short 6 TF, with first profit target at 5 ticks for 2 contracts, 10 ticks for another 2,and 20 ticks for the last 2.
Melcotran is offline  
Reply With Quote
Old 11-06-2008, 12:02 PM   #4
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,411
Thanks: 252
Thanked 976 times in 959 posts
Default

Hi Melcotran,

You would have to use different entry order for every target you have. Then you can exit a specific quantity with a unique order name from the full position.

Please review this link - http://www.ninjatrader-support2.com/...ead.php?t=3271

Any of those orders provides you with a quantity as well as signal name input, so you can code custom scaling strategies.

Quote:
Originally Posted by Melcotran View Post
How would I enter multiple targets for a single position? For example: short 6 TF, with first profit target at 5 ticks for 2 contracts, 10 ticks for another 2,and 20 ticks for the last 2.
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
Stops and Targets ttwmacci Strategy Development 2 10-01-2008 08:27 AM
targets and stops not showing suitguy1 ATM Strategies (Discretionary Trading) 3 08-14-2008 12:26 PM
Simulated stops and profit targets. dtf139 ATM Strategies (Discretionary Trading) 3 03-11-2008 06:57 AM
Strategy Analyzer- stops and targets dtf139 Strategy Analyzer 3 12-14-2007 01:28 PM
Stops/Targets calculated by % copodon Suggestions And Feedback 2 05-13-2005 10:50 AM


All times are GMT -6. The time now is 12:14 AM.