Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Trade seems to miss being executed and ends up one bar late
Collapse
X
-
Trade seems to miss being executed and ends up one bar late
I plotted a red dot on the char corresponding to the Short Entry, however, the arrow points to bar where the trade was not taken. The red dot corresponds to other trades that were all taken correctly before and after. I am using Volume bars, Tick Replay is NOT enabled, I am using the continuum connection and running it in real time ( this bar is a couple days old ). Note I hardcoded the bar to make a trade and only the EnterShort() worked as all stop and limit entries skipped the bar. What am I missing about how trades are calculated in this particular scenario? Thanks.2 PhotosTags: None
-
Yes Chris ... that is what I expect....if the code I draw the dot on the current bar and add and entershortstopmarket if looking to go short then plot dot, entershortstopmarket ...
I would expect the order to be filled on the next bar, however, it is not filled. I event put in code to hard code specific bar with the dot....and on that bar I do all 4 entry short type signals.. ... stop market, limit, etc.....only EnterShort() actually enters on the next bar at open as you would expect....but clearly, on the first bar with the dot, the next bar hit the stop...but an entry is not made...
On that next bar, I have the same logic since i did not get into the market...so the bar that missed the trade I paint a DOT and EnterMarketStopShort and on the very next bar the trade gets entered correctly....
So to sum up the issue....on the bar with the dot, I EnterShortStopMarket at the price where the current dot was printed....clearly the next bar hits the stop and a trade should occur...it doesn't so
the next bar with the same logic print the dot and entershortstopmarket and that executes successfully...
Why did it not work on the one bar and not the previous bar....'
This is not an issue about tick data I do not believe....and I understand that on the bar close a dot prints and on the first tick of the next bar a entershortstopmarket ...clearly the bar goes thru the stop price ( the previous bars red dot ) however a trade does not occur. ...
Comment
-
I figured out the issue...For managed trades the trade to the short side was being ignored for that bar.....due to another order while flat....From the documentation under managed trades:
Methods that generate orders to enter a position will be ignored if:
•A position is open and an order submitted by a non market order exit method (ExitLongLimit() for example) is active and the order is used to open a position in the opposite direction
•A position is open and an order submitted by a set method (SetStopLoss() for example) is active and the order is used to open a position in the opposite direction
•A position is open and two or more Entry methods to reverse the position are entered together. In this case the second Entry order will be ignored.
•The strategy position is flat and an order submitted by an enter method (EnterLongLimit() for example) is active and the order is used to open a position in the opposite direction
•The entry signal name is not unique
Thanks.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by johntraderuser2, Today, 02:34 AM
|
0 responses
6 views
0 likes
|
Last Post Today, 02:34 AM | ||
Started by IanS00, 03-27-2024, 11:24 AM
|
2 responses
12 views
0 likes
|
Last Post Today, 02:00 AM | ||
Started by Mariawilcoxi, Today, 01:32 AM
|
0 responses
4 views
0 likes
|
Last Post
by Mariawilcoxi
Today, 01:32 AM
|
||
Started by gleichnerany, Today, 01:17 AM
|
0 responses
5 views
0 likes
|
Last Post
by gleichnerany
Today, 01:17 AM
|
||
Started by WHICKED, 03-27-2024, 12:33 PM
|
4 responses
47 views
0 likes
|
Last Post Today, 12:28 AM |
Comment