![]() |
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
|
|||||||
| Strategy Analyzer Support for automated system backtesting and optimization using the NinjaTrader Strategy Analyzer. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Dec 2008
Posts: 32
Thanks: 0
Thanked 0 times in 0 posts
|
Hi guys,
Has anyone noticed if you are running a strategy that can be long and short that the move from long to short happens all at once? I am trying to write a strategy that is going to scale into and scale out of positions rather than exit the whole positions and goes short. I have tried to do this by avoiding using {default quantity} and using a fixed amount of 1 but no luck so far... That will let me accumulate a position (one at a time) but when the sell signal comes along the strategy sells the whole accumulated position and goes short 1. Am I missing something? Thanks Alex |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
|
Hello,
There are two things going on here if I understand you correctly: 1) You are scaling into your reversal so you will have both a long and a short trade/orders open at the same time. You cannot be both long and short within the same market literally. 2) To prevent orders from being both long and short the orders to enter have an embedded method to close opposing orders automatically. So when you enter a long position and you already have a short position open, the long position is automatically closed. This link has information on this: http://www.ninjatrader-support.com/H...verview36.html
Ben
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Dec 2008
Posts: 32
Thanks: 0
Thanked 0 times in 0 posts
|
Nope that is not what I am asking.
don't want to be "long" AND "short" What i want is if I am long 10... and i get a sell signal- i would like to sell 1 (net possie of 9) On the next sell signal I would like to sell another 1 (net possie of 8) and on the next buy signal buy 1 (net possie of 9) and so on... can this be done? Thanks Alex |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
|
Hello,
To scale out you will need to scale in. There is only one ExitLong() for each EnterLong(). This link has an example: http://www.ninjatrader-support2.com/...ead.php?t=3751
Ben
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How can I load/unload external dll not exiting NT every time? | maxima | General Programming | 7 | 01-19-2009 08:43 AM |
| Hedging Longs and Shorts | three faced devil | Strategy Development | 8 | 11-05-2008 08:24 AM |
| Counting stop losses on the Longs and Shorts | stefy | Strategy Development | 1 | 06-27-2008 06:15 AM |
| Strategy: Entering on one time frame and exiting on another | NinjaTrader_Josh | Reference Samples | 0 | 02-23-2008 04:29 PM |
| Long trade, executing shorts | Dunthrin | Automated Trading | 15 | 07-11-2007 09:49 AM |