PDA

View Full Version : How to place All Or Nothing order??


Czarek
02-22-2009, 08:40 PM
Hallo.
How to place AOL orders. I use EntryLimit orders and sometimes unfilled part is smaller than lot and this is a case of error and strategy termination. This happened in forex if the order quantity is 25 000 then filled part is 20000 so the rest 5000 made error because smallest quantity is 18 000.
Czarek

NinjaTrader_Ben
02-23-2009, 01:03 AM
Hello,

This is not supported, sorry.

Czarek
02-23-2009, 05:42 AM
How to avoid this problem ?? Strategy sometimes terminate by its self.
Czarek.

NinjaTrader_Bertrand
02-23-2009, 08:27 AM
Which broker are you executing on?

Czarek
02-23-2009, 08:58 AM
Interactive Brokers

NinjaTrader_Bertrand
02-23-2009, 09:57 AM
Please go to Tools > Options > Strategies > NinjaScript and try setting your OrderHandling option to 'ByStrategyPosition'.

Please also check this link - http://www.ninjatrader-support.com/HelpGuideV6/StrategiesTab.html

Czarek
02-23-2009, 10:47 AM
Hallo.
I'm not sure if this could help. OrderHandling option to 'ByStrategyPosition'. Concern Stop los and target orders. However, the problem is that if I want to buy 25000Euro, and I got 20000 filled then if strategy want to buy outstanding 5 000 Euro, I got the Error because smallest amount, I can buy is 18 000. Therefore, trategy close all orders and terminate it self.
So the error comming from entry order not stop or target order.
Czarek.

NinjaTrader_Bertrand
02-23-2009, 11:52 AM
Hi Czarek, I see - please send your log and trace files to support at ninjatrader dot com Attn Bertrand so I can investigate further. Thanks!

Czarek
02-24-2009, 03:04 AM
Bertrand.
The message I got is: Order Message: Warring: our order is smaller than the minimum order size of 20000 EUR (399) Affected order Buy 5000 Limit.

Czarek

NinjaTrader_Bertrand
02-24-2009, 08:35 AM
Thanks for the clarification Czarek - I would suggesting to contact your broker on why you get these partial fills - have you tried using a different order type such as a market / stop order?

Czarek
02-25-2009, 09:09 AM
Bertrand.
I tried market orders but I lost to much on each transaction. Today I talked to TWS team, and I found out that actually the small order (5000EURO) is placed but not in Idea Pro but is transferred to Idea and can get filled. Unfortunately simultaneously the error message is sent by TWS and there is now way to turn it off in TWS. Are any way that Ninja strategy will be ignoring such error messages????
Czarek

NinjaTrader_Bertrand
02-25-2009, 09:33 AM
Unfortunately not Czarek, if an error is generated the strategy will terminate, unless you look into this option - http://www.ninjatrader-support.com/HelpGuideV6/RealtimeErrorHandling.html But this is an advanced topic and will require your due diligence in using it. Thanks.

Czarek
02-25-2009, 10:26 AM
Bertrand.
If I put this code:
protected override void Initialize()
{
RealtimeErrorHandling = RealtimeErrorHandling.TakeNoAction;
}
will the strategy not take any action for the error messages and keep working ???? I play using my strategy about 4 months live and until now only the partial filled error appeared so I'm not afraid on any other event happened? However, because of this error I lost a very big target.
Czarek

NinjaTrader_Josh
02-25-2009, 10:33 AM
RealtimeErrorHandling turns off all handling. You need to manage everything yourself if you decide to use it.

Czarek
02-25-2009, 10:49 AM
Is that mean "turns off all error handling" and if I do not put any error handling rules strategy will not take any action if error appeared ?

NinjaTrader_Josh
02-25-2009, 10:56 AM
That is correct.