PDA

View Full Version : ExitLongLimit order with Signal Name


Nathamus
03-13-2007, 12:12 AM
Hello!

To enter Long positions with Limit orders using Quantity, Price and Signal Name
I can use the following order

EnterLongLimit(int quantity, double price, string signalName);
I wounder if there is a simmilar overload for the ExitLongLimit? I cannot find it. I would like to place the following order:

ExitLongLimit(int quantity, double limitPrice, string SignalName);

But I can only place:

ExitLongLimit(int quantity, double limitPrice, string SignalName, string fromEntrySignal);

and

ExitLongLimit(int quantity, double limitPrice, string fromEntrySignal);
As a result I cannot identify the source of a sell Limit Order on the order page.

My strategy creates lots of orders. For debugging purpose I need to identify which ExitLongLimit order was executed in a spefic situation. When I take a look at the Order Page all ExitLongLimit orders are identified as "sell" orders.

Any ideas? Is there a possibility to customize the order type overloads?

thx

NinjaTrader_Ray
03-13-2007, 02:24 AM
Why can't you use?







ExitLongLimit(int quantity, double limitPrice, string SignalName, string fromEntrySignal);
When fromEntrySignal is the signal you provided in EnterLongLimit() ?

Ray

Nathamus
03-13-2007, 03:37 AM
Because I cannot be sure which entry signal created the current situation / the current amount of shares.

Depending on the current situation different market entry ordersare created with a variable number of shares. Let's say if the market is above a yesterdays close+x buy 10 "buy_in_high", if it is in between close+10 and close-10 buy 3 "buy_in_mid" and if it is below close-10 buy 1 "buy_in_low". Then I buy an sell at certain levels ("buy_one_at_z", "sell_one_at_y", ... etc.). So a ExitLongLimit order could exit one shares of the position I initially bought to enter the market, or it could exitone shares Iadded later.

NinjaTrader_Ray
03-13-2007, 03:39 AM
I see.

Try this, I believe it should work:

ExitLongLimit(quantity, limitPrice, "MyExitName", string.empty);


Ray

Nathamus
03-13-2007, 04:09 AM
That works perfect, thanks for the tip.

Nathamus



PS: You have to write empty with capital E, otherwise it won't compile.

ExitLongLimit(quantity, limitPrice, "MyExitName", string.Empty);

NinjaTrader_Ray
03-13-2007, 04:14 AM
You correct, thanks for pointing it out.