NexusFi: Find Your Edge


Home Menu

 





NinjaTrader Alerts Window-use and abuse


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Tasker_182 with 2 posts (13 thanks)
    2. looks_two mokum with 1 posts (0 thanks)
    3. looks_3 cory with 1 posts (0 thanks)
    4. looks_4 Fadi with 1 posts (1 thanks)
    1. trending_up 2,689 views
    2. thumb_up 14 thanks given
    3. group 4 followers
    1. forum 3 posts
    2. attach_file 4 attachments




 
Search this Thread

NinjaTrader Alerts Window-use and abuse

  #1 (permalink)
 
Tasker_182's Avatar
 Tasker_182 
Cedar Rapids, iowa
Legendary Market Wizard
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Ninjatrader - Continuum
Posts: 716 since Aug 2009
Thanks Given: 476
Thanks Received: 1,401

Hi,

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
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
MC PL editor upgrade
MultiCharts
Better Renko Gaps
The Elite Circle
REcommedations for programming help
Sierra Chart
How to apply profiles
Traders Hideout
What broker to use for trading palladium futures
Commodities
 
  #2 (permalink)
 
Fadi's Avatar
 Fadi 
Luxembourg
 
Experience: Advanced
Platform: NinjaTrader
Broker: IB / Kinetick
Trading: ES, CL
Posts: 485 since Apr 2012
Thanks Given: 667
Thanks Received: 648

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


Quoting 
[...] 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 [...]

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!
Follow me on Twitter Reply With Quote
Thanked by:
  #3 (permalink)
 
Tasker_182's Avatar
 Tasker_182 
Cedar Rapids, iowa
Legendary Market Wizard
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Ninjatrader - Continuum
Posts: 716 since Aug 2009
Thanks Given: 476
Thanks Received: 1,401


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]


Here then is Ninja's example code:

Alert("myAlert", NinjaTrader.Cbi.Priority.High, "Reached threshold", "Alert1.wav", 10, Color.Black, Color.Yellow);

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
Started this thread Reply With Quote
Thanked by:
  #4 (permalink)
 mokum 
Pattaya Thailand
 
Experience: Intermediate
Platform: Sierra
Broker: S5/Rithmic
Trading: Bund/Eurostoxx
Posts: 35 since Aug 2013
Thanks Given: 351
Thanks Received: 27

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 use the code: +Open[0]+

Code snippet:
Alert(tagPpvSound, Priority.Medium, "Long HDiv " +Instrument.MasterInstrument.Name+ " " +BarsPeriod.Value.ToString()+ " " +BarsPeriod.Id.ToString()+ " Price: " +Close[0]+ " ", PathSoundAlertHD, 0, Color.Green, Color.Black);

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)



Reply With Quote




Last Updated on April 20, 2015


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts