View Full Version : Buying & Selling vs. Reversing Positions
cgeorgan
06-22-2010, 09:18 AM
Hello,
On the one hand, I've witnessed behavior whereby a new short signal will both close any existing long position and initialize a new short with the default position size (position reversal). I've done this using the "EnterLong" and "EnterShort" methods.
If, on the other hand, I want to merely "buy" and "sell", without reversing positions (unless a position reversal occurs naturally...i.e. Long 1 --> sell 1 = flat --> sell 1 --> Short 1).
What methods should I be using so that a new long signal does not completely reverse a short position, and vice versa?
Kind Regards,
CG
NinjaTrader_RyanM
06-22-2010, 09:23 AM
Hello cgeorgan,
Yes, the default behavior is for entries to reverse positions.
You can add a check to your entries to verify that you are flat.
if (Position.MarketPosition == MarketPosition.Flat)
EnterLong();
This help guide article can help with setting this in the strategy wizard. (http://www.ninjatrader-support.com/HelpGuideV6/ConditionBuilder-MarketPositionComparisons.html)
cgeorgan
06-22-2010, 09:25 AM
Hello cgeorgan,
Yes, the default behavior is for entries to reverse positions.
You can add a check to your entries to verify that you are flat.
if (Position.MarketPosition == MarketPosition.Flat)
EnterLong();
This help guide article can help with setting this in the strategy wizard. (http://www.ninjatrader-support.com/HelpGuideV6/ConditionBuilder-MarketPositionComparisons.html)
I follow; is there a method to use what you've described here to merely sell part of a long position when a new short signal comes up, rather than sell the entire long and reverse?
NinjaTrader_RyanM
06-22-2010, 09:46 AM
In order to scale out of a position, you must first scale in. The scale out order quantity is then set from the quantity of your uniquely-named entry rules. The reference sample below can help with this:
Scaling out of a position (http://www.ninjatrader-support.com/vb/showthread.php?t=3751)
cgeorgan
06-22-2010, 09:58 AM
In order to scale out of a position, you must first scale in. The scale out order quantity is then set from the quantity of your uniquely-named entry rules. The reference sample below can help with this:
Scaling out of a position (http://www.ninjatrader-support.com/vb/showthread.php?t=3751)
Yes, I have noticed this methodology and have put it into use...that is, when I enter long positions, each unique entry generates a target exit and a trailing stop.
However, sometimes I do not know where I want to exit part of my position, or where I thought I wanted to exit has now changed based on a new "sell" signal. Thus, if I was long at 1 with a target of 1.5, but my sell signal comes when price is 1.25, I now want to sell one of those contracts outright.
I get the feeling you're going to tell me that I need to start looping through entries, matching orderID's, and adjusting target prices.
I am hoping instead you'll tell me that somehow I can merely submit "buy" and "sell" orders that will do the following:
-If I get a sell signal and i'm not long, create a new short position with associated target+stop;
-If I get a sell signal and I'm long, sell one of my long contracts and cancel any associated target+stop orders.
NinjaTrader_RyanM
06-22-2010, 11:15 AM
Yes, using our managed order system will match exit quantities to the entry quantities based on signal name.
We have introduced an unmanaged approach in our upcoming version 7. This will allow you more freedom, but the increased complexity means that there is more to manage on your own. Below link provides information on an unmanaged approach to strategy order submission.
http://www.ninjatrader.com/support/helpGuides/nt7/unmanaged_approach.htm