Category Other  Published on 19/03/2014

Price Alarm (Sound)

Description

Indicator plays sound when price reach some level.

Parameters:

Price: the target price, 1.29345 for example

Spot price (Bid: 1, Ask: 2): type of spot price. If you want to play sound when Ask price reach the target price then specify 2. If you want to play sound when Bid price reach the target price then specify 1.

In order to hear the sound, please make sure that sounds are enable in your cTrader/cAlgo:


u

algotrader's avatar
algotrader

Joined on 12.11.2012

  • Distribution: Free
  • Language: C#
  • Trading platform: cTrader Automate
  • File name: Price Alarm (Sound).algo
  • Rating: 0
  • Installs: 7349
Comments
Log in to add a comment.
RO
robert.vanderlaan · 4 years ago

Why does it need Unlimited Access?

(it asks for that, when you first apply it, which is a no-go for me)

BO
boh113 · 9 years ago

If anyone else has issues using yahoo change the port to 587 that solved my issues.

also see below for correct placement

Notifications.PlaySound(Path.Combine(windowsFolder, "Media", "tada.wav"));                   

>>>Notifications.SendEmail("fx.alert@yahoo.com.au", "fx.alert@yahoo.com.au", "Price Alert", "TRIGGERED");

 triggered = true;

 

BO
boh113 · 9 years ago

Is it possible to add an email notification to the indicator?

I found this but cant figure out where to place it:

Notifications.SendEmail("***@yahoo.com.au", "***@yhaoo.com.au", "Price Alert", "TRIGGERED");

Have tried a couple of locations in the code namely:

line after:

 Notifications.PlaySound(Path.Combine(windowsFolder, "Media", "tada.wav"));

and 

at the end of 

  public override void Calculate(int index)
        {
            if (triggered)
            {
                PlayedNotificationLine[index] = Price;
                return;

 

either place i get a failed to send email in the log.

settings are correct as ctrader sends emails on open and close of trades, just cant get it to send with this indicator

 

algotrader's avatar
algotrader · 9 years ago

Hello ForexShawn,

I'm not interested in payed work. Contact any of these guys: http://ctrader.com/consultants/.

FO
ForexShawn · 9 years ago

Hi AlgoTrader,

Are you interested in developing cTrader indicators for mutually agreed upon $.

I would like to start with Price Alarm. There are several additions I would like to make to it

including:

     a) Make it so the alarm line can be dragged into whatever position desired once it is on the chart

     b) Change the alarm so it can be set to ring just once or multiple times

Thank you in advance for your feedback.

 

mDull's avatar
mDull · 10 years ago

Could any one modify this code to sound an alarm with vertical/time lines?

Thanks

algotrader's avatar
algotrader · 10 years ago

Notifications.PlaySound(@"C:\my file.mp3");

AR
Arpad · 10 years ago

It doesn’t play the sound for me too.

Could you tell me how should I modify the code if I want to write the absolute path to the sound file, please?

So, instead of this row:

                    Notifications.PlaySound(Path.Combine(windowsFolder, "Media", "tada.wav"));

what should I write?

Thanks.

MA
Mack10 · 10 years ago

good work Algotrader. Very useful. I was wondering if it can be set to repeat the alarm until the user shuts it off. I'm a terrible programmer and your assistance would be greatly appreciated

RE
remz · 11 years ago
Hi Algotrader, can you please help me? The indicator doesn't play the sound, only changes the color of the line for the preset color. The sound is on. Thank you! Regards, Remz
algotrader's avatar
algotrader · 11 years ago
it should be shown automatically. Please wait until market will be opened.
Jutimant's avatar
Jutimant · 11 years ago
how can I show pip count on the triggered line for this good indicator?
RE
reggytrades · 11 years ago
This is a really useful addition. Thanks for your efforts. Would it be possible to set an alarm on a trendline as well? To encourage speedy development, I would be happy to help fund the development work. There is a lot of innovation in this area for metatrader being done by a coder at fxalgotrader.com. His pricing is a subscription model at a very reasonalbe $62.50/3months for a very robust suite of alerts. If anyone else is believes this could help them reduce "stare time" maybe we can help move this idea forward. Please let us know.