Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
EnterLong Doubt...??
Collapse
X
-
Hi Deall, it would depend on your EntryHandling settings used, you can definitely scale into a position - http://www.ninjatrader.com/support/f...ead.php?t=3751
-
If you need the individual execution prices of your orders making up the position I would suggest checking into the IOrder objects offered for more advanced programmers - http://www.ninjatrader.com/support/h...ightsub=IOrder
Comment
-
Would unfortunately not have a specific example for your case here handy, but generally for working with the IOrders and the advanced order management approach I consider this here to be ideal - http://www.ninjatrader.com/support/f...ead.php?t=7499
Comment
-
The IOrder syntax in the NT Help documents all the supported properties. In this case, you are looking for the AvgFillPrice property. Access it with standard OOP syntax.Originally posted by DealI View Posthi can u give syntax for that or any sample code to get value of the Longprice using IOrdrers
Comment
-
hi i have one doubt
#region Variables
private IOrder entryOrder = null;
protected override void OnBarUpdate()
{
.....
...
....
if( entryOrder == null && c <= b)
{
entryOrder = EnterLong();
Print("a=" + entryOrder.AvgFillPrice);
}
everything flows correctly and executes but
for a= entryOrder.AvgFillPrice as i mention in print commd .. its not printing the value just printing 0 y its not printing the price value
Comment
-
At the time that the Print statement is executed, immediately after the entry, the order is unlikely to have been filled, so the AvgFillPrice would be zero.Originally posted by DealI View Posthi i have one doubt
#region Variables
private IOrder entryOrder = null;
protected override void OnBarUpdate()
{
.....
...
....
if( entryOrder == null && c <= b)
{
entryOrder = EnterLong();
Print("a=" + entryOrder.AvgFillPrice);
}
everything flows correctly and executes but
for a= entryOrder.AvgFillPrice as i mention in print commd .. its not printing the value just printing 0 y its not printing the price value
You probably want to check this when you have a position, so check for that first.
As an aside, it is not a program error if you do not get what you expect. As you can see, there was no error message here.Code:if (Position.MarketPosition != MarketPosition.Flat) { //do stuff here; }
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
648 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
369 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
108 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
572 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
574 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment