Also, where are the sounds located so i can add some new ones.
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
Collapse
X
-
alerts
To get MFI to sound an alert if it crosses above or below 50 or to make the background color change with an indicator, does it require the strategy package upgrade?
Also, where are the sounds located so i can add some new ones.Tags: None
-
simpletrades,
You should be able to create alerts for it from the Market Analyzer without programming. Note that it won't necessarily be a CrossAbove/Below, but you can do > or <. CrossAbove/Below for the Market Analyzer will be available in NT7. The sounds are located at C:\Program Files\NinjaTrader 6.5\sounds directory.
Josh P.NinjaTrader Customer Service
-
Originally posted by NinjaTrader_Josh View Postsimpletrades,
You should be able to create alerts for it from the Market Analyzer without programming. Note that it won't necessarily be a CrossAbove/Below, but you can do > or <. CrossAbove/Below for the Market Analyzer will be available in NT7. The sounds are located at C:\Program Files\NinjaTrader 6.5\sounds directory.
http://www.ninjatrader-support.com/H...onditions.html
Comment
-
not rearming
Originally posted by NinjaTrader_Josh View PostYou can have it not rearm.
I have an indicator with 2 lines (upper and lower). If Close[0] crosses above the upper price, then sound an alert. If Close [0] crosses below the lower price, then sound a different sounding alert. It works fine, although terribly clunky since I can't move the line with the mouse, but it sounds multiple times per bar and I would like it to just sound once and then be available to sound again any following bar. I have managed to make it sound just once with a boolean condition, but can't figure out how to reset the boolean for the next bar.
Any (relatively) precise tips on how to do this?
Comment
-
Originally posted by NinjaTrader_Josh View PostPlease provide the code you are using.
/// Two alerts, one crossing above, one crossing below
/// </summary>
[Description("Two alerts, one crossing above, one crossing below")]
public class AlertLines : Indicator
{
#region Variables
// Wizard generated variables
private double upperPrice = 990; // Default setting for UpperPrice
private double lowerPrice = 980; // Default setting for LowerPrice
private bool warningup = false;
private bool warningdown = false;
// User defined variables (add any user defined variables below)
#endregion
/// <summary>
/// This method is used to configure the indicator and is called once before any bar data is loaded.
/// </summary>
protected override void Initialize()
{
Add(new Plot(Color.FromKnownColor(KnownColor.HotPink), PlotStyle.Line, "Above"));
Add(new Plot(Color.FromKnownColor(KnownColor.DodgerBlue), PlotStyle.Line, "Below"));
Plots[0].Pen.DashStyle = DashStyle.Dash;
Plots[1].Pen.DashStyle = DashStyle.Dash;
if (warningup == true || warningdown == true)
warningup = false; warningdown = false;
CalculateOnBarClose = false;
Overlay = true;
PriceTypeSupported = false;
}
/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.
Above.Set(upperPrice);
Below.Set(lowerPrice);
//if (CountIf(delegate {return CrossAbove(Close,upperPrice,1);}, 1) <= 1)
//{warningup = false;}
if (CrossAbove(Close,upperPrice,1) )
{Alert("LineAlertUp",NinjaTrader.Cbi.Priority.Low, "LineCrossUp","Alert3.wav",6,Color.Black,Color.Yel low);warningup = true;}
if (CrossBelow(Close,lowerPrice,1))
{Alert("LineAlertDown",NinjaTrader.Cbi.Priority.Lo w,"LineCrossDown","bonk.wav",6,Color.Black,Color.Y ellow);warningdown = true;}
}
Now this is the current working version with the booleans warningup and warningdown being essentially disabled. When enabled the last 2 lines look like:
if (CrossAbove(Close,upperPrice,1) && warningup == false
{Alert("LineAlertUp",NinjaTrader.Cbi.Priority.Low, "LineCrossUp","Alert3.wav",6,Color.Black,Color.Yel low);warningup = true;}
if (CrossBelow(Close,lowerPrice,1) && warningdown == false)
{Alert("LineAlertDown",NinjaTrader.Cbi.Priority.Lo w,"LineCrossDown","bonk.wav",6,Color.Black,Color.Y ellow);warningdown = true;}
+++++++++++
The Countiff is an attempt that didn't do anything.
I have tried putting the lines that set the warningup and warningdown back to false in the OnBarupdate versus Initialize section but whenever I have the warnings included in the Alert coding, they just sound once, then the boolean condition goes to true, and I can't get it to 'rearm' or go back to false at the beginning of the next bar.
(The way I would like to use these is simply that once an alarm is hit, I can either leave it silent as is, or set a new alert level in the Indicator Menu. I like alerts for those times I step away from the computer to do something basically.)
Comment
-
Originally posted by NinjaTrader_Josh View PostTry something like this to reset the bool on the new bar.Code:OnBarUpdate() { if (FirstTickOfBar) { warningup = true; warningdown = true; } if (CrossAbove....) { Alert(...); warningup = false; } }
Have had many problems today with Ninja. Had to restore from a few days ago to get it to work. But then on opening a new workspace after using it for an hour or so live, the charts wouldn't open up with any historical data.
In the log I have an error that the AlertLines indicator needs to be serialized but I can't find any information about serialization in the Help Menu.
I have added in the XML ignore in the Properties section to the Plots but it would be good to get this serialization issue cleared up so that if there are other problems with the overall platform I can deal with them.
Comment
-
See http://www.ninjatrader-support2.com/...ead.php?t=4977 for serialization.Josh P.NinjaTrader Customer Service
Comment
-
Originally posted by NinjaTrader_Josh View PostSee http://www.ninjatrader-support2.com/...ead.php?t=4977 for serialization.
Suggestion: include something about 'serialization' in the Help Menu. It doesn't come up on any searches except as part of something that doesn't explain anything to do with this.
Comment
-
Hi - I was looking for a cross over alert on google and ran across this thread. I can't seem to find the cross over option anywhere in MA. Am I missing something or has this been postponed?
Thanks!
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by strategist007, Today, 07:51 PM
|
0 responses
2 views
0 likes
|
Last Post Today, 07:51 PM | ||
Started by StockTrader88, 03-06-2021, 08:58 AM
|
44 responses
3,967 views
3 likes
|
Last Post
by jhudas88
Today, 06:59 PM
|
||
Started by rbeckmann05, Today, 06:48 PM
|
0 responses
4 views
0 likes
|
Last Post
by rbeckmann05
Today, 06:48 PM
|
||
Started by rhyminkevin, Today, 04:58 PM
|
4 responses
55 views
0 likes
|
Last Post
by dp8282
Today, 06:13 PM
|
||
Started by iceman2018, Today, 05:07 PM
|
0 responses
6 views
0 likes
|
Last Post
by iceman2018
Today, 05:07 PM
|
Comment