I also noticed that Trade.Entry.BarIndex is reported on Bar index 0 even though Trade.Entry.BarsInProgress may be on another bar, i.e. orderBarIndex. The same goes for Trade.Exit.BarIndex.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
During State Terminated CurrentBars[orderBarIndex] returns incorrect value
Collapse
X
-
During State Terminated CurrentBars[orderBarIndex] returns incorrect value
Hello. I've noticed that CurrentBars[orderBarIndex] does not return samr value as BarsArray[orderBarIndex].CurrentBar when executing in State.Terminated of OnStateChange event handler. BarsArray[orderBarIndex].CurrentBar seems correct.
I also noticed that Trade.Entry.BarIndex is reported on Bar index 0 even though Trade.Entry.BarsInProgress may be on another bar, i.e. orderBarIndex. The same goes for Trade.Exit.BarIndex.Tags: None
-
Hello [email protected],
Thank you for your post.
BarsArray[barsInProgress index].CurrentBar is not documented so there is no expected behavior at this time. However, the Bars object would no longer be present once you are in the State of Terminated.
CurrentBars would pull the last value since OnBarUpdate().
Trade.Entry/Exit.BarIndex is not documented either. There is once again no expected behavior. However the BarsInProgress is likely not the same item as an entry or exit's bar (BarIndex).
Please let me know if you have any questions and I will check with the Product Management team on these items.
-
Hello [email protected],
Thank you for your patience.
These items would not be exposed in NinjaTrader 8 and were not intended for end users in NinjaTrader 7.
For the BarsArray[].CurrenBar, you would use CurrentBars[BarsInProgress index].
For the BarIndexs, you would store the CurrentBar when the execution occurs manually.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by andrewtrades, Today, 04:57 PM
|
1 response
5 views
0 likes
|
Last Post Today, 05:02 PM | ||
Started by chbruno, Today, 04:10 PM
|
0 responses
4 views
0 likes
|
Last Post
by chbruno
Today, 04:10 PM
|
||
Started by josh18955, 03-25-2023, 11:16 AM
|
6 responses
436 views
0 likes
|
Last Post
by Delerium
Today, 03:42 PM
|
||
Started by FAQtrader, Today, 03:35 PM
|
0 responses
7 views
0 likes
|
Last Post
by FAQtrader
Today, 03:35 PM
|
||
Started by rocketman7, Today, 09:41 AM
|
5 responses
19 views
0 likes
|
Last Post Today, 03:33 PM |
Comment