NinjaTrader Support Forum  

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 06-30-2012, 10:54 AM   #1
Zhorny
Member
 
Join Date: Jun 2010
Posts: 56
Thanks: 3
Thanked 0 times in 0 posts
Default Two Losing Trades = No More Trading

Hi team,

How do I make it so that if my strategy has two losing trades in a row during today's session I do not open any new positions?

Cheers,

Z
Zhorny is offline  
Reply With Quote
Old 06-30-2012, 12:54 PM   #2
NinjaTrader_AdamP
NinjaTrader Customer Service
 
NinjaTrader_AdamP's Avatar
 
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
Default

Zhorny,

Here is a reference sample that shows you how to do something similar : http://www.ninjatrader.com/support/f...ad.php?t=19289
NinjaTrader_AdamP is offline  
Reply With Quote
Old 06-30-2012, 04:55 PM   #3
Zhorny
Member
 
Join Date: Jun 2010
Posts: 56
Thanks: 3
Thanked 0 times in 0 posts
Default

Thanks. Is there a way this can be programmed into the Wizard without having to code?
Zhorny is offline  
Reply With Quote
Old 07-01-2012, 10:36 AM   #4
NinjaTrader_AdamP
NinjaTrader Customer Service
 
NinjaTrader_AdamP's Avatar
 
Join Date: Aug 2011
Location: Denver, CO, USA
Posts: 2,895
Thanks: 241
Thanked 375 times in 365 posts
Default

Zhorny,

I imagine there would be some way to do something similar, but it would be best to use the reference sample. You can make your strategy to a point in the wizard, then add the loss code as a last step.

Here is a helpful video on programming in NinjaScript : http://www.youtube.com/watch?v=JZpo01eSO9c
NinjaTrader_AdamP 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
Ninjatrader7 losing trades?? Frederic Automated Trading 3 05-18-2012 10:42 AM
Consecutive Losing trades- how to double down wprosser Strategy Development 8 08-19-2011 06:13 AM
Winning Trades Calculated as Losing Trades neb1998 Strategy Development 0 07-02-2011 11:36 PM
Stop trading after Two losing trades cesas Automated Trading 1 07-27-2009 11:03 AM
disable script after consecutive losing trades? wcredle Strategy Development 1 06-08-2008 09:40 PM


All times are GMT -6. The time now is 01:52 PM.