PlaySound(@"Alert4"); No sound is played, no error and my computer make other sounds without any problem. So it isn't the computer.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
PlaySound()
Collapse
X
-
PlaySound()
Please show me where I'm being stupid. I've played sounds before from code and now i can't make it work. The sound I'm trying to play is in the nt sounds folder. I insert this line of code into my indicator without any conditions just to test it and no sound is played nor is there an error in the log.
PlaySound(@"Alert4"); No sound is played, no error and my computer make other sounds without any problem. So it isn't the computer.Tags: None
-
-
Hello Mike,
If you're using PlaySound() with a default sound file, you do not need to specify a path with the @ symbol. This should only be used if you are directing the sound outside of the default directory:
Please try using PlaySound("Alert4.wav");
If using CalulateOnBarClose = True, this alert will not trigger until the next bar forms.MatthewNinjaTrader Product Management
Comment
-
cobc is set to false and removed the @ symbol
What I sent you was PlaySound(@"Alert4");
Very dumb I changed to this...PlaySound("Alert4.wav"); I forgot to include the file extension.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
156 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
90 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
138 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
130 views
1 like
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
107 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment