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 04-10-2010, 08:59 AM   #1
Sleeping Troll
Senior Member
 
Join Date: Mar 2010
Location: Tampa, FL
Posts: 186
Thanks: 0
Thanked 3 times in 1 post
Send a message via Yahoo to Sleeping Troll
Default StopLoss not updating properly when pulling 2 of 3 contracts

I enter my order with this line:

Code:
Order = EnterLongLimit(3,EntryPrice,"Long");
I set My stop loss here:
Code:
SetStopLoss("Long",CalculationMode.Price,StopLong,false);
My order fills and sets 3 buys for stop loss

I take 2 contracts "off the table" with this line:

Code:
ExitLong(2,"GrabLong","Long");
Problem is it leaves 2 StopLoss orders in place instead of just 1 so consequently when I reach my StopLoss on the runner it enters me into a Short contract. ???
Sleeping Troll is offline  
Reply With Quote
Old 04-10-2010, 11:14 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,

It sounds like you are scaling out. If so, you will need to do it this way:
http://www.ninjatrader-support2.com/...ead.php?t=3751
NinjaTrader_Ben is offline  
Reply With Quote
Old 04-11-2010, 05:39 AM   #3
Sleeping Troll
Senior Member
 
Join Date: Mar 2010
Location: Tampa, FL
Posts: 186
Thanks: 0
Thanked 3 times in 1 post
Send a message via Yahoo to Sleeping Troll
Default

THx, Ben! I finally have my Beta and so far it looks golden!
Sleeping Troll 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
Pulling Data miketpcc2 General Programming 2 01-02-2010 12:30 AM
Chart Data QM 12-09 ZenFIre not Updating Properly mjuviler Version 7 Beta General Questions & Bug Reports 7 10-26-2009 08:42 AM
Chart not updating properly rally7 Miscellaneous Support 7 09-14-2007 07:42 AM
Charts not updating properly after starting Ninja MarlinTrader Charting 1 06-04-2007 07:25 AM
Bond contracts not updating Brightstar Charting 2 06-05-2006 02:26 AM


All times are GMT -6. The time now is 08:25 AM.