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 08-13-2009, 03:46 AM   #1
vast524
Senior Member
 
Join Date: Apr 2008
Posts: 132
Thanks: 0
Thanked 0 times in 0 posts
Default Stop strategy after reaching a set $loss

I am wondering how I can store the highest daily profit achieved ($500) and then stop the strategy once $200 is lost from this value.
I guess I will need something like:
Performance.AllTrades.TradesPerformance.Currency.C umProfit >= 500 && ??
I couldn't find a $ loss command.
Any help would be appreciated
Regards
Last edited by vast524; 08-13-2009 at 03:48 AM.
vast524 is offline  
Reply With Quote
Old 08-13-2009, 07:28 AM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

You would need to create your own variables and track these yourself. You can use the TradesPerformance class and watch each trade. If they lose, add that loss value to your loss counter.
NinjaTrader_Josh 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
How to set a stop loss order manually in a RELIABLE way? NetTecture Strategy Development 5 07-23-2009 05:37 AM
How do I set stop loss based on low of setup bar? ninjablanks General Programming 1 12-12-2008 07:12 AM
Set Stop Loss with limit price Czarek Strategy Development 19 11-12-2008 07:19 AM
Set stop loss or not Jenny Market Analyzer 2 02-07-2008 02:37 PM
Need to set a stop loss equal to indicator value... dendy Strategy Development 2 10-16-2007 08:12 AM


All times are GMT -6. The time now is 03:59 PM.