Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
About OHLC and OHL indicator alerts
Collapse
X
-
Hello ラリー,
there are symbols that do not sound an alert even though the conditions are met.
The common denominator of those symbols that did not sound seemed to be when the market gapped up (when the opening price of the day achieved the previous day's high) after the close.
JesseNinjaTrader Customer Service
-
Thank you for your reply.
Had they been met previously? You have on condition reversed selected, if the condition was already met before then it won't alert a second time, it would need the opposite condition to become true to re arm the alert.
It may be better to send you a video of a demonstration during the opening of the market to better inform you.
We will send the video on Tuesday because the Japanese market will be closed for a three-day weekend.
Thank you for your understanding.Last edited by ラリー; 10-07-2022, 04:38 PM.
Comment
-
Hello ラリー,
Reloading NinjaScript or manually activating alerts before or even during the start of a market will trigger an alert for all symbols
It may be better to send you a video of a demonstration during the opening of the market to better inform you.
JesseNinjaTrader Customer Service
Comment
-
Thank you for your reply.
When you reload NinjaScript that will reprocess the historical bars again. If your conditions become true during those bars it would cause an alert or do the action that you programmed. During the start of the market you now have new bars which can be processed and may additionally cause alerts depending on what conditions you made. If you want to find out why the script is working like it is you would need to use Prints to debug your code to know why.
That would really only let me see what is happening but I would not be able to provide a specific set of directions on how to fix the conditions. If the condition is becoming true before it should or at the wrong time or not at all you would need to use Prints to identify what is causing that to happen in those specific use cases.
I'm sorry if my explanation took up your time, so I just wanted to send you a video.
I would appreciate it if you could confirm it.
Comment
-
Hello ラリー,
In that case, both OHL and OHLC Script prints would be required, correct?
Yes you would need to print whatever is being used in the conditions for the alert to see what values are observed. You can do that for any of the areas you see it working or not to better understand if the conditions you made are having some trouble or are not accounting for all use cases that you needed.
JesseNinjaTrader Customer Service
Comment
-
We have taken a video to check the operation and are sending it to you.
It is a little long, but we would appreciate it if you could check it when you have time.
In this video, Reload was performed before the market started, and the high price of the day (October 7) was compared with the high price of the previous day (October 6), and alert logs (symbols 2721, 6928, etc.) were output. However, the alert log was not output and the alert was not sounded even though these were renewing the previous day's high (Oct. 7) today (Oct. 11).
I would like to output these logs and sound the alerts, so I am contacting you this time.
We have also printed the document in print, and I am attaching a screenshot of the text and the print statement in NinjaScript.
Thank you in advance.
Comment
-
Hello ラリー,
Unfortunately the video is not helpful for me to understand what may be happening. Have you tried to reduce the number of instruments you used so that you can output the details for just an instrument which is not having the alert?
Because you are not using NinjaScript to submit the alert you would have to address why the condition for the alert is not becoming true in the tool which uses the indicators. If the action of reloading the script is where you see the problem that would be the best place to experiment to find out why. You can also try using the playback connection to diagnose the problem so you don't have to wait for a specific time of day to test.
If the condition for the alert is becoming true in historical data that would be why the alert is not appearing, alerts only appear in the log during Realtime bars, it would otherwise be silently ignored.
An alternative would be to use the NinjaScript alert function rather than trying to configure alerts in the user interface, that would be a better way to ensure the alerts are happening by physically programming the conditions for the alerts. You can then debug that use case using prints if you do that.
JesseNinjaTrader Customer Service
Comment
-
Thank you for your reply.
Unfortunately the video is not helpful for me to understand what may be happening. Have you tried to reduce the number of instruments you used so that you can output the details for just an instrument which is not having the alert?
No, I would like to do so, but it may be difficult because the situation may change depending on the movements of individual stocks after the opening of trading on the day, such as alerts.
However, as a common point that the alert does not sound, I think there is a chart image in the latest screenshot, but 2721 and 6928 continue to update the previous day's high price.
Also, I think that 9271 and 6550 have updated the previous day's high only on the day.
And in the case of 9271, the opening price of the day updated the high price of the previous day, but an alert sounds here.
This means that the alert will not sound if the previous day's high price is updated for more than 2 days in a row and it is updated at the open price.
Because you are not using NinjaScript to submit the alert you would have to address why the condition for the alert is not becoming true in the tool which uses the indicators. If the action of reloading the script is where you see the problem that would be the best place to experiment to find out why. You can also try using the playback connection to diagnose the problem so you don't have to wait for a specific time of day to test.
But I want them to ring when the conditions are met in real time.
As an addendum to the above.
An alternative would be to use the NinjaScript alert function rather than trying to configure alerts in the user interface, that would be a better way to ensure the alerts are happening by physically programming the conditions for the alerts. You can then debug that use case using prints if you do that.
Comment
-
Hello ラリー,
You can find a sample of creating an alert in the help guide link that I had posted. You can call Alert() from a condition in NinjaScript. That would let you debug that use case in more detail because you are making the conditions for the alert in the code directly. If something is not working right you can then use Print statements to output the values and make sure the condition is becoming true in realtime. This also makes sure the re arm type is not at fault because the alert is being submitted by the script rather than the user interface.JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by GussJ, 03-04-2020, 03:11 PM
|
15 responses
3,270 views
0 likes
|
Last Post Today, 03:15 PM | ||
Started by Tim-c, Today, 02:10 PM
|
1 response
8 views
0 likes
|
Last Post Today, 02:52 PM | ||
Started by Taddypole, Today, 02:47 PM
|
0 responses
2 views
0 likes
|
Last Post
by Taddypole
Today, 02:47 PM
|
||
Started by chbruno, 04-24-2024, 04:10 PM
|
4 responses
51 views
0 likes
|
Last Post
by chbruno
Today, 02:38 PM
|
||
Started by TraderG23, 12-08-2023, 07:56 AM
|
10 responses
403 views
1 like
|
Last Post
by beobast
Today, 02:35 PM
|
Comment