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 > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 09-12-2009, 02:41 AM   #1
forrestang
Senior Member
 
Join Date: Aug 2009
Location: Chicago
Posts: 213
Thanks: 39
Thanked 4 times in 4 posts
Default Are wins/losses stored in the script, how to count them?

Howdy,

I am wanting to ammend a strategy I have created to create various p/L models based on position size.

What I want to do, is for example add a contract after every # of wins. I dont want the strategy to do this for autotrading purposes, but just to create various models.

To do this, I need to find out how to get rather or not the last trade was a win or loss. How can I do this?

Once I have that value, I would like to put a counter in each of the entry conditions and increment it, and if a looser occurs, start it over maybe, or decrement it? I haven't figured that out, but for now I just need to obtain the win/loss for the most recent trade.

Thanks,
Forrest
forrestang is offline  
Reply With Quote
Old 09-12-2009, 12:23 PM   #2
NinjaTrader_Ben
NinjaTrader Customer Service
 
NinjaTrader_Ben's Avatar
 
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
Default

Hello,

You options for money management are discussed and illustrated in this link:
http://www.ninjatrader-support2.com/...ead.php?t=4084

If you have any other questions, please attempt to code it then post that code and we will provide help if we can.
NinjaTrader_Ben 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
Anyone else seeing connection losses? heech Connecting 5 12-02-2008 11:13 AM
Updated:MACD BB and TICKS Count Indicator Will somebody CODE this in NINJA SCRIPT SurfMaverick Indicator Development 1 11-12-2008 07:28 AM
Stop Losses stefy Strategy Development 2 05-13-2008 07:15 PM
Stop losses lgarcia3 Strategy Development 1 04-12-2008 08:00 AM
Stop Losses not working? zoltran General Programming 2 11-08-2007 04:00 AM


All times are GMT -6. The time now is 12:16 PM.