NexusFi: Find Your Edge


Home Menu

 





Adding sound files to indicator


Discussion in NinjaTrader

Updated
    1. trending_up 5,321 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:	324
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?
Cheap historycal L1 data for stocks
Stocks and ETFs
Strategy stop orders partially filled
EasyLanguage Programming
MC PL editor upgrade
MultiCharts
Footprint for strategy Builder
NinjaTrader
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Funded Trader platforms
67 thanks
Trading with Intuition
16 thanks
Self sabotage reframed
15 thanks
GFIs1 1 DAX trade per day journal
14 thanks
Just another trading journal: PA, Wyckoff & Trends
13 thanks
  #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