NexusFi: Find Your Edge


Home Menu

 





Adding sound files to indicator


Discussion in NinjaTrader

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




 
Search this Thread

Adding sound files to indicator

  #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:	323
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?
About a successful futures trader who didnt know anythin …
Psychology and Money Management
Better Renko Gaps
The Elite Circle
MC PL editor upgrade
MultiCharts
How to apply profiles
Traders Hideout
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
  #2 (permalink)
 
Saroj's Avatar
 Saroj 
Arcata, CA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: index futures, oil
Posts: 485 since Jun 2009
Thanks Given: 232
Thanks Received: 415

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: 295


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

Try:

PlaySound("long.wav");

Reply With Quote




Last Updated on November 16, 2009


© 2024 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 - Privacy Policy - Downloads - Top
no new posts