NinjaTrader Support Forum  

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 10-25-2011, 07:08 AM   #1
ntosc
Junior Member
 
Join Date: Oct 2011
Posts: 2
Thanks: 0
Thanked 0 times in 0 posts
Default ninjascript

Sorry about the basic question.
I have a standard MA crossover strategy coded. Presently the exit is after another cross in the opposite direction.and I would like to change it to a target of X ticks with a trail of X ticks with an option for changing it according to market volatility.
Would someone be kind enough to tell me how.
Thank you.
Last edited by ntosc; 10-25-2011 at 07:10 AM.
ntosc is offline  
Reply With Quote
Old 10-25-2011, 07:31 AM   #2
NinjaTrader_Brett
NinjaTrader Customer Service
 
NinjaTrader_Brett's Avatar
 
Join Date: Dec 2009
Location: Denver, CO, USA
Posts: 6,499
Thanks: 109
Thanked 291 times in 280 posts
Default

Hello,

Thanks for the note.

The best way most likely to do this is to have 2 different strategies. Keep your original and enable this if market volatility suits this style of strategy. Create a copy of your current strategy by going to the strategy wizard and go to view code button. Then right click on the code and select Save As. Give it a new name and then re open it via the control center->tools->Edit NinjaScript.

Once this is done go back into the strategy wizard and go to the stops and targets page. Add in a profit target and a stop loss following these instructions. You can add in a basic trail stop here as well.

http://www.ninjatrader.com/support/h...rd_screens.htm
Understanding the Stops and Targets screen
NinjaTrader_Brett is offline  
Reply With Quote
Old 10-25-2011, 07:31 AM   #3
koganam
Senior Member
 
Join Date: Feb 2008
Location: Durham, North Carolina, USA
Posts: 3,354
Thanks: 24
Thanked 1,304 times in 1,067 posts
Send a message via Skype™ to koganam
Default

Quote:
Originally Posted by ntosc View Post
Sorry about the basic question.
I have a standard MA crossover strategy coded. Presently the exit is after another cross in the opposite direction.and I would like to change it to a target of X ticks with a trail of X ticks with an option for changing it according to market volatility.
Would someone be kind enough to tell me how.
Thank you.
Take a look at this, posted in 2009: http://www.ninjatrader.com/support/f...ad.php?t=23740
koganam 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
ninjascript help kishisaki Strategy Development 3 10-08-2010 12:46 PM
NinjaScript and C# trader2be General Programming 1 08-26-2010 09:59 AM
Can this be done via Ninjascript? lookOutBelow General Programming 3 07-13-2010 08:52 PM
Help with ninjascript mattismyth Indicator Development 2 03-13-2009 06:56 PM
Need Help with NinjaScript duckfan312 Strategy Development 1 10-31-2008 08:06 AM


All times are GMT -6. The time now is 11:21 PM.