NexusFi: Find Your Edge


Home Menu

 





Adding sound files to indicator


Discussion in NinjaTrader

Updated
    1. trending_up 5,943 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 2 posts
    2. attach_file 2 attachments




 
Search this Thread
  #1 (permalink)
desander
Panama
 
Posts: 4 since Oct 2009
Thanks Given: 1
Thanks Received: 0

Hello Mike,

I downloaded two sound files (long.wav and short.wav) to C:\Program Files\NinjaTrader 6.5\sounds
and included them in my existing indicator.
(see extract hereunder)
Then i clicked on "compile" and closed the edit-window.

Now the sounds are not playing when the conditions are met ?
What did i do wrong ?
Programming fault ?

The indicator is attached.

PS. Please detailed instructions, i am not a programmer !

Gilbert.


double val = Low[bar+1] - ( TickSize * ArrowDisplacement );
DrawArrowUp(CurrentBar.ToString(),1, val , barColorUp );
//data[ data.Count - 1] = val * -1;
//setData( data, bar, val * -1 );
if (soundon && FirstTickOfBar){
PlaySound(@"C:\Program Files\NinjaTrader 6.5\sounds\long.wav");
}
}
//else if( lastDirection > direction )
else if (Signal[0] == -1 && Signal[1] != -1)
{
double val = High[bar+1] + ( TickSize * ArrowDisplacement );
DrawArrowDown(CurrentBar.ToString(),1, val, barColorDown );
if (soundon && FirstTickOfBar){
PlaySound(@"C:\Program Files\NinjaTrader 6.5\sounds\short.wav");


Attached Thumbnails
Click image for larger version

Name:	Sound_files.png
Views:	421
Size:	110.4 KB
ID:	4317  
Attached Files
Elite Membership required to download: DoubleMAPaint_SharkyPkg.zip
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Saylors 41-Month HODL Breaks: Strategy Sells 32 BTC as $ …
Prediction Markets & Event Contracts
Irans Answer Due Today: Peace Surges to 33.5%, Invasion …
Prediction Markets & Event Contracts
April 2026 Jobs Report: +115k vs +65k Expected
Traders Hideout
El Clasico Draws $9.2M in Prediction Market Action -- Bi …
Prediction Markets & Event Contracts
$4.5M Floods Russia Nuclear Contract in 24 Hours -- Krem …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
8 thanks
Darmok and Jalad at Tanagra
1 thanks
  #2 (permalink)
 
Saroj's Avatar
 Saroj 
Arcata, CA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: index futures, oil
Posts: 482 since Jun 2009
Thanks Given: 232
Thanks Received: 416

I've never tried hardcoding the sound file; try this approach:


Reply With Quote
  #3 (permalink)
 
roonius's Avatar
 roonius   is a Vendor
 
Posts: 131 since Jun 2009
Thanks Given: 20
Thanks Received: 298


PlaySound(@"C:\Program Files\NinjaTrader 6.5\sounds\long.wav");

Try:

PlaySound("long.wav");


Reply With Quote




Last Updated on November 16, 2009


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts