Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Getting Alerts to work Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
cortner
Posted : Tuesday, August 11, 2015 12:16:47 PM
Registered User
Joined: 4/13/2014
Posts: 11

Reading through some old posts I have been unable to get the alert function to work.

Here is the test code I have made just to see if I can get the Alert file to play on a watchlist.

The below condition has been placed as a watchlist column and then scanned.

Any ideas as to what may be wrong?

===============================

If Me.isLastBar AndAlso (Price.close(0) - Price.Close(1)) / Price.Close(1) > .02 Then 
pass
LokiStatic.PlaySound("c:\Alarm1.wav")
End If
===============================
Gr8Trades
Posted : Thursday, August 13, 2015 6:48:55 PM
Registered User
Joined: 5/6/2014
Posts: 81

I have posted on this subject extensively:

http://forums.worden.com/default.aspx?g=posts&t=52507

and other postings as well.

Just do a search; posted by : pthegreat

hope it helps

Gr8Trades
Posted : Thursday, August 13, 2015 7:49:52 PM
Registered User
Joined: 5/6/2014
Posts: 81

Just gave your code a quick test. this works for me:

If isLastBar Then
  If (Price.close(0) - Price.Close(1)) / Price.Close(1) > .02 Then
    'showmessage("test")
    LokiStatic.PlaySound("c:\windows\media\notify.wav")
    pass
  End If
End If
 
I've had an issue once that it didn't want to play my wav file. replaced it with another, and it worked.
do a test with the windows "notify.wav" file. That one works for sure.
it should be in c:\windows\media
 
After you get this to work, you'll probably will run into the issue that it keeps playing the file over and over until the condition is false. If you want to have it play just once per bar then read my post above.
cortner
Posted : Friday, August 14, 2015 2:30:44 PM
Registered User
Joined: 4/13/2014
Posts: 11

After copying your file and then customizing it to meet my needs, the Alert works!

Thanks for your help and I will look at your other posts for how to limit the looping of the alert.

Thanks for replying and providing your other resources.

Much appreciated.

Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.