[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EL help - BEEP



PureBytes Links

Trading Reference Links

If you want to hear the wav every tick just set the indicator to update
every tick and use something like the following 2 lines only:

Condition1= playsound("C:\omega\start.wav");
Plot1(c," ");

You should watch your cpu utilization (in win2000 use task manager).
Continuously playing a wav file can max out your cpu - probably the cause of
your crashing.

If the problem is caused by running out of cpu, even with just the 2 lines
above, you could perhaps try playing the wav file every other tick or every
third tick with something line the following:

This would need to be on a 1 tick chart.  Anything else would require a
global variable type dll in the code.


Inputs: PlayFreq(2); {keep increasing this number till you find something
your cpu can live with}

if mod(barnumber,PlayFreq)=0 then begin
    Condition1= playsound("C:\omega\start.wav");
    Plot1(c," ");
end;


shawn


----- Original Message -----
From: "J Parris" <jparris@xxxxxxx>
To: <omega-list@xxxxxxxxxx>
Sent: Saturday, October 05, 2002 10:01 AM
Subject: EL help - BEEP


> I like to listen to markets as well as watch them. To do this I pieced
> together the 5 lines of code shown below to execute a .wav file on every
> tick. It works great - except - it crashes my computer 3 or 4 times a day.
> Unfortunately, these 5 lines greatly exceed my programming expertise. I
was
> way over my head. Now, I have no idea what is going wrong - whether it is
a
> problem with the code, my cheapie computer (1.2 g Celeron 256k), sound
card,
> or what ? I would greatly appreciate any suggestions that might head me in
> the right direction. I am using TS 4.0 b27.
>
> Thank You
>
> Jim
>
> Here is the code:
>
> {*****************************************
>
> BEEP: Executes .wav file on tick
>
> *******************************************}
>
> Condition1= c < c[1] or  c=c[1] or  c>c[1];
>
> Begin
>
> Plot1(c," ");
>
> Condition1= playsound("C:\omega\start.wav");
>
> End;
>
>
>
>