Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
IB and GetAtmStrategyPositionAveragePrice()
Collapse
X
-
Thanks for sending in these files.
I can see your avg price was actually reported as avg price=2.73595523809524
It was likely this large decimal value which prevented it from being displayed.
Did you happen to check the Positions tab of the Control Center at this time? How as the avg price reported in TWS?
If you make a trade on the Sim101 account, do you see the same or is it 0.0001 as expected?
Please let us know if you see this again on the next live trade.MatthewNinjaTrader Product Management
Comment
-
Next Trade:
Placed short order @ 2.7752 with Avg Fill Price of: 2.77514476190476
Positions Tab showed price of: 2.77514476190476
Stop and Target orders were placed properly and Stop filled correctly with Target order cancelling.
However, the Strategy failed to place the next trade. Will investigate code, but if an error occurred with ATMStrategyId, The Strategy would be unable to reset it to String.Empty and await new trigger.
Comment
-
Next Trade Again - Short @ 2.77724476190476:
Basically the same as the previous one, however, I attempted to Flatten the trade through the Strategy (this works perfectly in Sim101 and other futures such as CL).
The activating code is in a Toolstrip button with code of:
private void btnFlatten_Click(object sender, EventArgs e)
{
if(orderId.Length > 0)
AtmStrategyCancelEntryOrder(orderId);
AtmStrategyClose(atmStrategyId);
// atmStrategyId = string.Empty;
// orderId = string.Empty;
btnFlatten.Enabled = true;
flattened = true;
}
The Stop and Target orders were both cancelled, however, I got an error message saying "Cancel attempted when order is not in cancellable state. Order permid =2064036466 (161) affected order: Buy 1 Limit @ 2.7707 and the position remained on. I also notice that the Log Tab is showing I placed an order for RB 03-13, but got an execution on RB 02-13 (IB Trade Log shows trades in RB 03-13).
Would you like my Log/Trace files?
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by algospoke, Yesterday, 06:40 PM
|
2 responses
23 views
0 likes
|
Last Post
by algospoke
Today, 07:04 PM
|
||
Started by ghoul, Today, 06:02 PM
|
3 responses
14 views
0 likes
|
Last Post Today, 06:43 PM | ||
Started by jeronymite, 04-12-2024, 04:26 PM
|
3 responses
45 views
0 likes
|
Last Post
by jeronymite
Yesterday, 10:10 PM
|
||
Started by Barry Milan, Yesterday, 10:35 PM
|
7 responses
21 views
0 likes
|
Last Post Today, 06:16 PM | ||
Started by AttiM, 02-14-2024, 05:20 PM
|
10 responses
181 views
0 likes
|
Last Post
by jeronymite
Today, 06:11 PM
|
Comment