Profile Picture

Revert position in single trade

Posted By danflu 3 Years Ago
Message
QuestionMark Posted Wednesday December 03 2014
Hello,

I'm testing RightEdge.
My trading system has a situation where I need to revert a long position to a short position ( and vice versa ). Currently I'm implementing this as follows:

// reverting a short to a long
position.CloseAtMarket(); // close short
OpenPosition(PositionType.Long, OrderType.Market); // open long

The drawback is that this way I'm charged two times for the commission ( since there are two operations ) where in the real life I would be charge only once.
Is there a way to achieve the position reversion in a single trade ?

Thank you very much,
Daniel
phg
Supreme Being (48,273 reputation)Supreme Being (48,273 reputation)Supreme Being (48,273 reputation)Supreme Being (48,273 reputation)Supreme Being (48,273 reputation)Supreme Being (48,273 reputation)Supreme Being (48,273 reputation)Supreme Being (48,273 reputation)Supreme Being (48,273 reputation)
Posted Thursday December 04 2014
Out of curiosity, what broker are you using?
I know of no way to avoid two commissions with my broker (IB), for example.


-Pete

See also Yahoo group about applying RE.

Posted Thursday December 04 2014
Yes, you can do this.  You will need to set the PositionManager.PositionOverfilledAction to DoNothing.  For simulation, you will need to enable the "Allow Position Reversal" option in the paper trader settings.

Then you can manually submit an order to reverse the position.  For example, if you are long 100 shares, you could submit an order to sell 200 shares.  The broker will consider this as one transaction (assuming it supports this), and RightEdge will interpret the fill as closing one position and opening another one in the opposite direction.

Thanks,
Daniel
Posted Thursday December 04 2014
>Out of curiosity, what broker are you using?
>I know of no way to avoid two commissions with my broker (IB), for example.

Pete, several brokers offer a flat fee for a unlimited number of shares ( i.e. thinkorswim by TD Ameritrade ). They charge per transaction. But even in the IB account you mentioned it would make a difference as they charge a minimum fee of 1$. So it makes a difference if you trade 2 times 100 shares or one time 200 shares.

-Helmuth
Posted Sunday December 07 2014
Thanks! My broker here in Brasil allows me to revert the position without paying two comissions.
Another question: I imported 1 year 1 min data.
When I open the chart it works BUT if I change the frequency from 1 minute to daily it shows only 12 bars in the chart. Is there a way to show the entire year ?

Thanks,
Daniel
Posted Monday December 08 2014
danflu (12/7/2014)
Another question: I imported 1 year 1 min data.
When I open the chart it works BUT if I change the frequency from 1 minute to daily it shows only 12 bars in the chart. Is there a way to show the entire year ?


Go to the Charts tab of the RightEdge options.  The "Maximum Bars Displayed" setting controls how many bars RightEdge will load by default when you open a chart.  By default it's 5000, so the chart was probably loading 5000 1 minute bars, which ended up being about 12 daily bars worth.  You can set this value to zero to load all of the bars, but it may be slower with lots of data.

Thanks,
Daniel



Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems