![]() |
|
|
#1 |
|
Member
Join Date: Oct 2008
Location: Lopez Island Washington
Posts: 47
Thanks: 32
Thanked 0 times in 0 posts
|
Is there any way to toggle on or off alerts or alert sounds for charting indicators. Is there any way to choose a preferred sound for alerts from charting indicators? If these options must be hardcoded, is there a .wav file for silence?
|
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,566
Thanks: 261
Thanked 1,015 times in 996 posts
|
Hawk Arps, correct you would need to custom code this into your study either via PlaySound() or Alert() - I believe you could selfrecord a quick .wav with the mic muted and then use it in the indicator.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_Bertrand for this post: |
|
|
|
#3 |
|
Member
Join Date: Oct 2008
Location: Lopez Island Washington
Posts: 47
Thanks: 32
Thanked 0 times in 0 posts
|
I have been able to create an alert toggle with drop down menu for alert sounds within the input parameters.Hooray! However, I want to be able to do this to several indicators.... when I repeat the process for the second, third, etc... indicators I get a compile error message stating that my enum AlertSound {} already exists in the global namespace... yet it doesn't work in the second,third indicators. Is there a way to repeat this process for many indicators without changing the name of the enum AlertSound { } for every indicator?
|
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Hello Hawk Arps,
Enums can only be declared once per namespace. Once declared (use Public for enums), you can have access to them from any other script.
Ryan M
NinjaTrader Customer Service
Last edited by NinjaTrader_RyanM; 09-22-2011 at 12:28 PM.
|
|
|
|
|
The following user says thank you to NinjaTrader_RyanM for this post: |
|
|
|
#5 |
|
Member
Join Date: Oct 2008
Location: Lopez Island Washington
Posts: 47
Thanks: 32
Thanked 0 times in 0 posts
|
In order to have many indicators access my public enum AlertSond {} without tying it to any one indicator in particular I have tried to place it in my User Defined Methods folder. However, the indicators do not seem to be able to find it there. Is there a generic way of creating an enum {} without tying to one particular indicator?
|
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Yes, there may be a way to do this. We only support declaring enum in the namespace, but some users prefer a different approach. This thread may assist with one alternative approache:
http://www.ninjatrader.com/support/f...ad.php?t=37521
Ryan M
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_RyanM for this post: |
|
|
|
#7 | |
|
Senior Member
|
Quote:
Of course, if you do use the enum in any other indicator, it means that the file in which you declared the enum must be present in the assembly, or all the other indicators will scream "bloody murder". That means that you must give the declaration file also to any other user to whom you give the indicator, and also on any computer on which you use any of the indicators. Now you know at least one of the reasons why declaring anything in the global namespace is a bad thing. |
|
|
|
|
|
The following user says thank you to koganam for this post: |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| No sounds | danemo | Version 7 Beta General Questions & Bug Reports | 6 | 07-01-2010 05:52 AM |
| NT alert sounds distorted on new system | Billy Valentine | Miscellaneous Support | 11 | 08-05-2009 02:17 AM |
| NT Alert Sounds | MXASJ | Miscellaneous Support | 1 | 06-06-2009 06:41 AM |
| Sounds | xewoox | Automated Trading | 1 | 02-20-2009 07:51 AM |
| Price Alert Modification for different sounds | MicroAl | Indicator Development | 1 | 08-27-2008 07:18 AM |