![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Jun 2008
Posts: 159
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
|
Hello,
This is not supported, sorry.
Ben
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jun 2008
Posts: 159
Thanks: 0
Thanked 0 times in 0 posts
|
How to avoid this problem ?? Strategy sometimes terminate by its self.
Czarek. |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
Which broker are you executing on?
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Jun 2008
Posts: 159
Thanks: 0
Thanked 0 times in 0 posts
|
Interactive Brokers
|
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
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/H...tegiesTab.html
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#7 |
|
Senior Member
Join Date: Jun 2008
Posts: 159
Thanks: 0
Thanked 0 times in 0 posts
|
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. |
|
|
|
|
|
#8 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
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!
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#9 |
|
Senior Member
Join Date: Jun 2008
Posts: 159
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#10 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
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?
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#11 |
|
Senior Member
Join Date: Jun 2008
Posts: 159
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#12 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,421
Thanks: 252
Thanked 982 times in 964 posts
|
Unfortunately not Czarek, if an error is generated the strategy will terminate, unless you look into this option - http://www.ninjatrader-support.com/H...rHandling.html But this is an advanced topic and will require your due diligence in using it. Thanks.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#13 |
|
Senior Member
Join Date: Jun 2008
Posts: 159
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#14 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
RealtimeErrorHandling turns off all handling. You need to manage everything yourself if you decide to use it.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#15 |
|
Senior Member
Join Date: Jun 2008
Posts: 159
Thanks: 0
Thanked 0 times in 0 posts
|
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 ?
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Place Buy order and Sell order at same time. | robotics | General Programming | 38 | 08-07-2009 02:10 PM |
| Place Order in multiple Instrument | laserjet | ATM Strategies (Discretionary Trading) | 3 | 12-11-2008 04:49 AM |
| How to place a order @stop on a market that doesn't accept them | skynetman | Strategy Development | 5 | 04-10-2008 09:44 AM |
| Unable to Place Order with Amp Futures | dgregor5 | SuperDOM and other Order Entry Windows | 6 | 01-22-2008 02:16 PM |
| how to place an opening order only trade | HelloHello | Automated Trading | 5 | 09-11-2007 08:02 PM |