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
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
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 MacDad, 02-25-2024, 11:48 PM
|
7 responses
158 views
0 likes
|
Last Post Today, 10:23 PM | ||
Started by Belfortbucks, Today, 09:29 PM
|
0 responses
7 views
0 likes
|
Last Post
by Belfortbucks
Today, 09:29 PM
|
||
Started by zstheorist, Today, 07:52 PM
|
0 responses
7 views
0 likes
|
Last Post
by zstheorist
Today, 07:52 PM
|
||
Started by pmachiraju, 11-01-2023, 04:46 AM
|
8 responses
151 views
0 likes
|
Last Post
by rehmans
Today, 06:44 PM
|
||
Started by mattbsea, Today, 05:44 PM
|
0 responses
6 views
0 likes
|
Last Post
by mattbsea
Today, 05:44 PM
|
Comment