PDA

View Full Version : Strategy doesn't play sound


grd974
06-12-2007, 12:44 PM
I use a strategy wich, when condition is met, carries out only 2 among the 3 required actions :

RemoveDrawObjects()
DrawFibonacciRetracements(...)
PlaySound(@"mypath\Connected.wav"

Fibonacci retracements are displayed but I cannot ear any sound.

Any help is welcome.
Gérard

NinjaTrader_Ray
06-12-2007, 12:50 PM
Hi Gerard,

Can you try:

PlaySound("Connected.wav");

also, this method is ignored on historical data.

grd974
06-13-2007, 07:32 AM
I use streaming data from Zenfire. I tried your suggestion but it didn't work; I also added a DrawDiamond instruction and it didn't work.

Gérard

NinjaTrader_Ray
06-13-2007, 07:36 AM
Please check your log tab for any error messages when running your script.

grd974
06-13-2007, 08:07 AM
The Log tab mentions : "Starting NinjaScript strategy 'MyFib/a1b2c4.....' : On starting a realtime strategy - Submit Live"

NinjaTrader_Ray
06-13-2007, 08:16 AM
Please use the attached strategy as a reference. This will draw a diamond and play a sound on the close of each real-time bar. I justed verified that it works.

grd974
06-13-2007, 10:29 AM
Eventually "Connected.wav" was successfully triggered and I have to check out further because it looks like that sound does not play first time the strategy is triggered.
Thanks a lot.