DayTrader_Cam
03-18-2009, 03:24 AM
NinjaTrader MarketAnalyzer AlertConditions have a property for specifying a sound file for alerts. This is a string value but in the property grid shows as a 'browsable file value', this is implemented through a 'SoundLocationEditor' attribute decorating the property, the code is shown below...
[Editor (http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System:2.0.0.0:b77a5c561934e089/System.ComponentModel.EditorAttribute/.ctor(System.Type,System.Type))(typeof(SoundLocati onEditor (http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://NinjaTrader.Core:6.5.1000.7/NinjaTrader.Gui.Design.SoundLocationEditor)), typeof(UITypeEditor (http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Drawing:2.0.0.0:b03f5f7f11d50a3a/System.Drawing.Design.UITypeEditor))), Description (http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System:2.0.0.0:b77a5c561934e089/System.ComponentModel.DescriptionAttribute/.ctor(String))("Sound file."), DisplayName (http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://NinjaTrader.Core:6.5.1000.7/NinjaTrader.Gui.Design.DisplayNameAttribute/.ctor(String))("Sound file"), Category (http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System:2.0.0.0:b77a5c561934e089/System.ComponentModel.CategoryAttribute/.ctor(String))("Alert")]
public string (http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.String) SoundLocation (http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://NinjaTrader.Core:6.5.1000.7/NinjaTrader.MarketAnalyzer.AlertCondition/property:SoundLocation:String)
{
get { return _soundLocation; }
set { _soundLocation = value }
}
Can you tell me if / how this same style can be implement on a NinjaTrader custom indicator, I'm unable to find the right references / using statements?
[Editor (http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System:2.0.0.0:b77a5c561934e089/System.ComponentModel.EditorAttribute/.ctor(System.Type,System.Type))(typeof(SoundLocati onEditor (http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://NinjaTrader.Core:6.5.1000.7/NinjaTrader.Gui.Design.SoundLocationEditor)), typeof(UITypeEditor (http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System.Drawing:2.0.0.0:b03f5f7f11d50a3a/System.Drawing.Design.UITypeEditor))), Description (http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System:2.0.0.0:b77a5c561934e089/System.ComponentModel.DescriptionAttribute/.ctor(String))("Sound file."), DisplayName (http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://NinjaTrader.Core:6.5.1000.7/NinjaTrader.Gui.Design.DisplayNameAttribute/.ctor(String))("Sound file"), Category (http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://System:2.0.0.0:b77a5c561934e089/System.ComponentModel.CategoryAttribute/.ctor(String))("Alert")]
public string (http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://mscorlib:2.0.0.0:b77a5c561934e089/System.String) SoundLocation (http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://NinjaTrader.Core:6.5.1000.7/NinjaTrader.MarketAnalyzer.AlertCondition/property:SoundLocation:String)
{
get { return _soundLocation; }
set { _soundLocation = value }
}
Can you tell me if / how this same style can be implement on a NinjaTrader custom indicator, I'm unable to find the right references / using statements?