Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Enter Order qty 0
Collapse
X
-
Enter Order qty 0
Seems like any entry method I use, when I set the quantity to 0 it still fires 1 order.. Is there a way to write this so I don't have to check for 0 quantity all the time? This really a a pain when testing multi contracts with different stops..
Last edited by gg80108; 10-24-2010, 12:19 PM.Tags: None
-
Any of the order entry methods have this issue,,, if any Variable ie: Qty1........ is set to 0, it still fires a 1 contract order. Its easy to tell from the names of the entry signals printed on the chart whats firing... I manage the contracts separately and all entries have different names and dont trade all contracts all the time.
Enclosed is the test on sample moving crossover code and I put in some parms on orders... Zeros fire 1 contract!
// variable
private int Qty1 = 0;
private int Qty2 = 0;
private int Qty3 = 0;
.
.
.
.
.
protected override void OnBarUpdate()
EntryOrderS1= EnterShort(Qty1,"Flux S1");
EntryOrderL1 = EnterLongLimit(0, true, Qty1, LowB , "Flux L1");Last edited by gg80108; 10-24-2010, 02:15 PM.
Comment
-
So did u really mean "order rejected" in ur previous comments,, since thats an official return status for order entry.... Its doesn't really reject.
"It works as expected on my end, an order with 0 qty is not an order unfortunately and would get rejected, thus we of course change to 1 qty, the min value. Please ensure in your code you only submit an order when you intend to trade."Last edited by gg80108; 10-25-2010, 07:58 AM.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
661 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
375 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
110 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
574 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
579 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment