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
alerts showing time stamp from a secondary data series
Collapse
X
-
alerts showing time stamp from a secondary data series
A few of my multi-time frame indicators are showing the time stamp for the secondary data series on the alert message which is the higher time frames time period ([1] array) when the alert is going out on the primary data series( [0] array). It only happens on some of the alerts but not all of them which is why its confusing. The main data series alert is triggered by conditions occurring on the main data series in addition to a boolean value generated by condition from the higher time frame which is called via barsinprogress == 1. My guess is that the order the inputs come in for the alert is what determines what time stamp shows up on the alert. If this is the case maybe it can be fixed by using a nested if statement for the main data series condition or maybe I need to use barsinprogress == 0 for the main data series alert. Please let me know how to resolve this because I only want these alerts to show the main data series time frame to avoid confusion.Tags: None
-
Hello gordongekko,
Thanks for your post.
Based on your description it does sound like one of the added data series is firing OnBarUpdate() when the alert condition is detected.
If you only want the alert sent from the chart bars time stamp then using a BarsInProgress check would help.Paul H.NinjaTrader Customer Service
-
If I gate my primary data series alert behind if BarsInProgress == 0 then I'm assuming it should send out the alert showing the primary data series in the time stamp.Is this correct? Currently, it uses conditions from the main data series and a boolean value obtained from a higher time frames conditions (that are only checked via BarsInProgress == 1) that must be true as part of the conditions for the alert but the main data series alert is not set to only run if that main data series is being called.Last edited by gordongekko; 01-09-2018, 10:50 AM.
Comment
-
Hello gordongekko,
Thanks for your reply.
Not having seen your code it is difficult to advise with clarity, however, if you only want the Alert() to fire on BarsInProgress = 0 then you can change just your alerts conditions like:
if (your various alert conditions && BarsInProgress == 0)
{
Alert(....);
}Paul H.NinjaTrader Customer Service
Comment
-
I set the alerts to only fire if barsinprogress == 0 and that solved the problem. I assumed this would work since it can't call both data series simultaneously via onbarupate and since the primary data series is always called first I just didn't think using barsinprogress for the main data series was necessary but apparently it is. Thanks for you help.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by wzgy0920, 04-20-2024, 06:09 PM
|
2 responses
27 views
0 likes
|
Last Post
by wzgy0920
Yesterday, 10:43 PM
|
||
Started by wzgy0920, 02-22-2024, 01:11 AM
|
5 responses
32 views
0 likes
|
Last Post
by wzgy0920
Yesterday, 10:33 PM
|
||
Started by wzgy0920, 04-23-2024, 09:53 PM
|
2 responses
49 views
0 likes
|
Last Post
by wzgy0920
Yesterday, 10:29 PM
|
||
Started by Kensonprib, 04-28-2021, 10:11 AM
|
5 responses
193 views
0 likes
|
Last Post
by Hasadafa
Yesterday, 10:19 PM
|
||
Started by GussJ, 03-04-2020, 03:11 PM
|
11 responses
3,235 views
0 likes
|
Last Post Yesterday, 08:07 PM |
Comment