PlaySound "STF UP" already!  [SOLVED]

Questions about MultiCharts and user contributed studies.
User avatar
Mark Brown
Posts: 181
Joined: 29 Nov 2016
Has thanked: 111 times
Been thanked: 17 times

PlaySound "STF UP" already!

Postby Mark Brown » 04 Jan 2021

this thing will drive you crazy with every tick even after the condition has passed.

if h crosses above whatever then PlaySound(C:\MultiCharts\whatever.wav");

so i am going to try

if h crosses above whatever and h[1]<whatever then PlaySound(C:\MultiCharts\whatever.wav");

all the settings for alerts are ignored i have found out they don't work for programed sounds. like play only once per bar.

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: PlaySound "STF UP" already!  [SOLVED]

Postby TJ » 04 Jan 2021

Try this:

Code: Select all

Var: intrabarpersist playonce(0); if h crosses above wattever and playonce <> currentbar then begin playonce = currentbar; playsound("c:\soundfiles\wattever.wav"); end;

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: PlaySound "STF UP" already!

Postby TJ » 04 Jan 2021

It would be nice if there is a keyword called PlaySoundOnce.


Return to “MultiCharts”