PDA

View Full Version : Reverse a position with 1 order


Joerg
01-16-2009, 03:50 AM
Hello,

at the moment I´m using EnterLong() and EnterShort() in my code and when a position completely changes from long to short without being flat then NT creates 2 sell orders, 1 for exitlong and 1 for entershort.

Is it possible to let NT automatically generate a sell oder of 2 lots for reversing a position or do I have to handle this by my own in the code?

Thanks a lot

Joerg

NinjaTrader_Josh
01-16-2009, 07:09 AM
Joerg,

No, this is not possible. You need to explicitly close the long and then explicitly open a short.

Joerg
01-16-2009, 09:31 AM
Hi Josh,

does NT check if the exitOrder is filled or is it just necessary to have it generated / or transmitted?

Is there a MarketOrder-Function in NT which does´nt refer to entry or exit?

Thanks a lot.

Joerg

NinjaTrader_Josh
01-16-2009, 09:38 AM
Not sure what you mean. When you go EnterLong() then EnterShort() after you have a long position it will exit the long and then enter you short. This is all automated for you.

If all you wanted to do was exit the long you can use ExitLong().

Joerg
01-16-2009, 09:43 AM
Yes, I see. The problem (or it´s more just an disadvantage) is that IB charges a minimum fee for each trade in FX and when I trade with small size (which I´d like to do at the beginning) it would be cheaper to reverse a position within just 1 transmitted order.

NinjaTrader_Josh
01-16-2009, 09:50 AM
There are rules that require one order to be marked as Sell and another as SellShort.