PDA

View Full Version : Play beep OnMarketDepth


MrBaffalo
11-18-2007, 08:33 AM
Hi Guys,
following the interesting Josh's SampleMarketDepth script I was trying to reproduce a beep once the last is on the bid side and a different frequency beep once the trade is on the offer side.
I was looking at

public static void Beep (
int frequency,
int duration
)


I'm not able to build something useful, could someone help me doing this?
Thanks
MB

Sorry Guys Irealized I'm on the wrong sub-forum

NinjaTrader_Josh
11-18-2007, 10:40 PM
Try creating two separate wav files and using the PlaySound() method?
http://www.ninjatrader-support.com/HelpGuideV6/PlaySound.html

MrBaffalo
11-19-2007, 01:02 AM
Thanks Josh
I know, it would be better, but I need to play a very short beep...

MrBaffalo
11-19-2007, 07:03 AM
Any suggestion?
Marcello

NinjaTrader_Josh
11-19-2007, 10:39 PM
Can't you just make the wav file consist of a very short beep? When you call PlaySound() it will play whatever is contained in your sound file. If the sound file is a whole 5 minute song it will play the whole thing, but if it is 1 millisecond it will only play for that duration.