Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I've started this thread with the intent and purpose of maximizing our (all users) common understanding and use of the NinjaTrader (V7) Alerts window and as indicator writers how we can better produce messages to help in the use and acceptance of the Alerts window itself.
I think that most traders either do not know or understand its use or don't want to give up the screen real estate. I know I have trouble myself devoting the space to it, however I do recognize it's value so I keep it on my main screen right in front of me. When one of my alerts sounds off I look right to the alerts window to see what chart, timeframe and message is being generated.
I also use the alerts window as a way to review the days activities in terms of indicator alerts. The fact that they are timestamped is great. The fact that I can easily export into excel makes it very easy to organize.
If you are currently not using an alerts window, try it out and see what you may have been missing. It can be found in the control center, File>New>Alerts. You can have only one window and if you have installed any indicators that output to the alerts window (You probably don't even know that some of them do this) you will find it automatically populating.
So what is the alerts window? Basically it is one window in your workspace that centralizes all of the alert messages provided by various indicators on your different charts. You are only allowed to have one Alerts window open. Here is an example of an alert panel (expanded view) on my system with some of todays alerts:
As you can see there can be quite a few, it all depends on if you filter them at all (these are not). You can filter them by instrument, priority, timeframe and message.
My alerts window in actual use is really narrowed down so that i only see 3 lines at a time which is usually good enough. It was the best compromise of screen space and the need to see the messages. Of course if I need to I can always maximize the window. This is how I see it all day:
Regrettably our friends at NinjaTrader have not done much to sell the use of the alerts window. Here is a link to their documentation of it. NinjaTrader Version 7
So what are the problems besides the screen real estate?
1) There is no overall guidance or direction to the creation and use of alerts and alert messages. This means that some indicator writers will minimally write alerts perhaps because it is easier to say less. What is a High Priority verses a low priority message? If you look at my expanded view example you can probably quickly see which messages provide an abundance of info and which do not. Color coordination, priority determination are all over the map.
2) Unless they have been programmed to, most indicators do not output alert messages. Most indicators provide output to the chart to which they have been installed. They produce waveforms, draw arrows, dots, lines and even text. So why would you want to output to the alerts window if all your goodies are on the chart? Because the alerts window can be the one place where your important indications can be timestamped and recorded from all of your charts. Say for example you have a 5 minute candle chart and you have an arrow indication, would it not be helpful to know exactly when in that 5 minute candle that arrow was produced? This is just one example of the value. Sorting through the messages at the end of the day help in your recreation of the trade decision.
3) When alert outputs are created (by the indicator writer), the messages they provide can be lacking in detail to be of help (so you ignore). Again look at the examples and you can see some only have a couple of words.
In general the Alerts window has four fields, Instrument (such as TF-0314), Priority (Low, medium, High), Time (mm/dd/yyyy hh:mm:ss) and Message. While that might seem enough it really isn't. I have several charts on say the TF running. If an alert goes off and all I know from the alert window is that it is on a TF chart then I have to quickly scan to find the related chart. Wouldn't it be better if the alert window message told you which chart generated the message? Again look at the examples and you can see which messages tell you "action" "chart/Timeframe" and "relevant data"
My intent with this thread is to develop some guidelines for use and code snippets to minimize the creation effort. I do not have all the answer and I am openly soliciting you for input and by you I don't mean just indicator writers but most of all the indicator users that would benefit from concise alert messages.
In subsequent posts I will share my code snippets for the alerts panel messages.
Does anyone have any thoughts concerning the coloring of messages and or the priority of messages? If so please feel free to contribute. I know that our friends at Ninja watch futures.io (formerly BMT) so hopefully they will take note of this thread and correct/advise as needed and think about NT8 implementation.
Regards and thanks for reading.
Be yourself; everyone else is already taken. Oscar Wilde
I've never understood how to use that panel, and honestly never bothered to learn either
Thanks for your thread, and this below was a real revelation to me LOL
You gave me some ideas, I don't have a screen real-estate problem; so will just experiment with something this weekend
Successful people will do what unsuccessful people won't or can't do!
Before we get into the why and when of using an Alert, we need to breakdown what the Alert method looks like and what are its inputs.
With reference to the NinjaTrader Helpfile we find:
10.4.2.1 Alert()
Definition: Generates a visual/audible alert for the Alerts window.
Syntax: Alert(string id, Priority priority, string message, string soundLocation, int rearmSeconds, Color backColor, Color foreColor)
* Calls to this method are ignored on historical data, it will only work in real-time. Gaaaahhhh!!!! - What does this mean as i think it is poorly written and confuses and scares some people away. Here is a simple way to understand what that meant: Any data that is loaded on your chart already IS historical data (has absolutely NOTHING to do with your historical data manager, etc). Doesn't matter if you are connected to the Live market connection, sim connection or Market replay connection. Any data loaded on your screen is considered historical. Now, from the moment data starts to move, that is right edge LIVE data to Ninja and doesn't matter if it is your live connection, Sim connection or the Market replay connection. Ninja treats moving data as live data regardless of source. So with that in mind, what Ninja is trying to say is that the Alert method does not operate on data that already exists on your chart, only when data is moving that the alert method will operate.
Getting back to the Alert breakdown
Syntax: Alert(string id, Priority priority, string message, string soundLocation, int rearmSeconds, Color backColor, Color foreColor)
Parameters
id A unique id for this alert
priority Any one of the following values:
NinjaTrader.Cbi.Priority.High
NinjaTrader.Cbi.Priority.Low
NinjaTrader.Cbi.Priority.Medium
message Alert message
[COLOR="rgb(255, 0, 255)"]soundLocation File name of .wav file to play. Provide either the
absolute file path or just the name if the file is
located in C:\Program Files\NinjaTrader Installation
Folder\sounds folder[/COLOR]
[COLOR="rgb(139, 0, 0)"]rearmSeconds Sets the number of seconds an alert will rearm. If
the same alert (identified by the id parameter) is
called within a time window of the time of last alert +
rearmSeconds, the alert will be ignored.[/COLOR]
[COLOR="rgb(47, 79, 79)"]backColor The alert row back color [/COLOR]
[COLOR="rgb(255, 140, 0)"]foreColor The alert row fore color[/COLOR]
The Alert is called "myAlert", it has been assigned a priority of "High", the alert message is "Reached Threshold", it will play the soundfile "Alert1.wav" found in the default NinjaTrader sound folder, the alert "myAlert" will automatically rearm in 10 seconds (and if conditions are the same will issue the alert again). The background of the message is "black", the foreground (or text) will be "yellow". Don't forget that when shown on the alerts panel NinjaTrader will show the four sections: Instrument name (like TF-0314) , Priority, Date/time and the message itself.
Now that we have reviewed the Ninja code requirements, let me show you one of my alerts and the code that supports it:
Alert("myAlert4", NinjaTrader.Cbi.Priority.Medium,"CS4: Candle touch Down on: "+Instrument.MasterInstrument.Name+" " +BarsPeriod.Value.ToString() +" "+ BarsPeriod.Id.ToString()+" Chart. Price= "+Close[0]+" Ang= "+iEMA, "Chime-4.wav", rearm, Color.Yellow, Color.Black) ; (Sorry I couldn't get all the colors to match)
As you can see i put more effort into the message and into identifying the chart and time frame. The code is
Instrument.MasterInstrument.Name = "TF"
BarsPeriod.Value.ToString() = "1"
BarsPeriod.Id.ToString() = "Minute"
The above 3 items I recommend be placed on every message
In my particular indicator case, I chose to also identify a couple of numbers I wanted to know, in this case price and an angle of an EMA, when the indication/alert occurred.
Hope this helps.
Be yourself; everyone else is already taken. Oscar Wilde
Hello,
Trying to add Instrument/TimeFrame/Price into the ECIdiv_V7 indicator (divergence indicator from @wwwingman )
Instrument & TimeFrame are displayed correct in the Alerts Window when a divergence occurs.
But with price following occurs:
Where the price of the indicator needs to be displayed is instead the value of the indicator displayed when a divergence occurs.
I have absolute no knowledge of C+.... tried to search via google and ninjatrader, but nothing fruitful came up
In the code i see a reference to:
public const int PRICE=1;
public const int INDICATOR=0;
I did try to change the code:
+Close[0]+
to:
+Close[1]+
but that did not help lol
Is there any way to get the price value displayed instead of the indicator value.?
Many thanks
peter
Note:
ECIdiv_V7 is here (elite download)
Please remove old version before installing this one.
Current version is V7
This indicator tries to detect price/indicator divergence.
Any indicator in Ninja can be used and detection is possible on historical and real time charts.
To set the …