Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Order not getting triggered
Collapse
X
-
Hello kapa1,
Without the full code and taking the necessary debugging steps to monitor the logic as it is executing, I could not provide further input on why the logic did not fire.
I've created a quick demonstration for adding debugging prints to a strategy in the Strategy Builder: https://www.screencast.com/t/rQBwlQKfwCAI\
After taking these steps and testing with Market Replay, do you see the conditions for your order logic becoming true and allowing the order submission?
If there is anything else I can do to assist, please let me know.Last edited by NinjaTrader_Jim; 10-05-2017, 07:00 AM.
-
it happened again.
Today it happened again. Buy order was never triggered on strategy. The strategy I am running had both buy and sell as well as different time it needs to be in. I will create a separate strategy for them and try to see what happen.
This strategy also have rule of not to trade on certain days(Like no long for Tuesdays and no short for Wednesdays). Do you think that might be the cause of the problem? A different strategy without day of the week restriction seems to be working flawlessly.
Thanks,
Kapa
Leave a comment:
-
Thank you.
I did debug my strategies a bit. It seems to be working fine for now. Thank you for your suggestion.
Kapa.
Leave a comment:
-
Hello kapa1,
Thanks for your replies.
The Strategy Builder creates NinjaScript code. If the order methods aren't firing, the logic must tell the tale. Debugging steps will still be your best route to analyze what is happening and to come up with a solution.
You can create a separate condition set (without conditions) in the Strategy Builder that prints out the values for your order entry condition, and I would also advise to place a print beside the order entry method to clearly see it getting fired.
When you disable and re-enable the strategy, historical data is processed and historical executions appear on your chart. (Historical means processed by historical data, not "past realtime orders.") We have not yet ruled out discrepancies between realtime and historical.
Please take the aforementioned debugging steps to verify your strategy logic in this instance using Market Replay Data to mimic realtime data.
As for the chart issue, it appears that an indicator you are plotting to the price panel is autoscaling the chart so you can always see the indicator plot, and it is then scrunching the chart bars so you can see the plot.
Please let me know if I may be of further assistance.Last edited by NinjaTrader_Jim; 10-02-2017, 06:27 AM.
Leave a comment:
-
-
Hi, Jim.
Here is my concern.
I do run strategy with strategy builder. Not with Ninja script. And it happened as I was watching the market. Simply put, 5min bar has been ended meeting requirements from signal and should have placed limit order to enter but never did. A few min later, I disable the strategy then turn back on, the trade appeared on the chart. So in this case, it was not due to discrepancies between realtime and backtest data. Any thoughts on what might have been the cause? And from late August, the system was spot on for getting in and out of trades.
Thank you,
Kapa.
Leave a comment:
-
Jim Thank you and have a great weekend. I will check out those link later today.
kapa
Leave a comment:
-
Hello kapa1,
Thanks for your inquiry.
Disabling and re-enabling a strategy will recalculate historical trades, and trades possible through historical data will be presented on the chart. The plot marker would be a historical trade after you re-enabled.
Historical Data and Realtime data are fundamentally different. Since a single tick can modify strategy results, it is possible to see conditions become true historically that do not become true in realtime.
Here are some resources that explain these discrepancies:
Discrepancies between realtime and backtest (historical data) - https://ninjatrader.com/support/help...ime_vs_bac.htm
Comparing real-time, historical, and replay performance - https://ninjatrader.com/support/foru...d.php?t=102504
For more information as to why you did not receive a submission for your order, debugging steps must be taken to observe how the logic is processed for real time data. I recommend to use Market Replay Data to recreate the scenario, and to add prints to your code as well as enabling TraceOrders to watch the strategy logic process in the NinjaScript Output window.
Here are some resources on debugging.
Debugging - https://ninjatrader.com/support/foru...ead.php?t=3418
TraceOrders - https://ninjatrader.com/support/foru...ead.php?t=3627
Please let me know if I may be of further assistance.Last edited by NinjaTrader_Jim; 09-29-2017, 11:03 AM.
Leave a comment:
-
Order not getting triggered
Hi.
I had buy signal in this morning but it was never triggered. I run strategy. End of the bar, buy at limit of closing(5Min). It has been working properly last few weeks and this was the first time it has happened. There was no Buy or error on LOG.
When I disabled and able strategy, the trade pop up on chart but deviously did not get into a position.
Where do you suggest me to check further?
Thank you,
kapaTags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by rmicalet, Today, 07:10 PM
|
0 responses
4 views
0 likes
|
Last Post
![]()
by rmicalet
Today, 07:10 PM
|
||
Started by cincai, Today, 07:02 PM
|
0 responses
1 view
0 likes
|
Last Post
![]()
by cincai
Today, 07:02 PM
|
||
Started by AlexsOptions, Today, 05:42 PM
|
2 responses
17 views
0 likes
|
Last Post
![]()
by AlexsOptions
Today, 06:18 PM
|
||
Started by philli4093, Today, 05:20 PM
|
2 responses
8 views
0 likes
|
Last Post
![]()
by philli4093
Today, 06:18 PM
|
||
Started by memonolog, Today, 04:58 PM
|
0 responses
4 views
0 likes
|
Last Post
![]()
by memonolog
Today, 04:58 PM
|
Leave a comment: