Audio alert system for price fluctuation

#1
Hi experts
This forum have always helped me to solved my problems related to Amibroker . I want some information as how to set code for low or high alert price. I already have alert for buy and sell signals as follow :

AlertIf( Buy2, "SOUND C:\\Windows\\Media\\notify.wav", "Audio alert", 2 );
AlertIf( Sell, "SOUND C:\\Windows\\Media\\chord.wav", "Audio alert", 2 );

Let me explain what i want. Suppose i have bought a share at 100 as per buy signal. Until the buy signal remains their is a lot of noise or some up down fluctuations. I want to get an alert when price of share goes down to 100.
In the same way if i have shorted a share at 100 then i want alert if it goes above 100.

This code is entirely different from buy and sell signals

Thanks a lot
sushie
 

sudris

Well-Known Member
#2
you can use ValueWhen function.

this should work
Code:
lastpriceBuy = ValueWhen(Buy2, Close);
lastpriceSell = ValueWhen(Sell, Close);
AlertIf( LastValue(Close) <=lastpriceBuy, "SOUND C:\\Windows\\Media\\notify.wav", "Audio alert", 2 );
AlertIf( LastValue(Close) >=lastpriceSell, "SOUND C:\\Windows\\Media\\chord.wav", "Audio alert", 2 );
 

VJAY

Well-Known Member
#3
Dear sudris,
Can we make these type of alerts to alert when price go abv/blw some levels?without any buy/sell signals in afl?means I put one horizontal line and I want alert when price go abv/blw that line........
 
#4
Thanks a lot SUDRIS.
I do not have much knowledge as how an afl works. I want to know whether to put the code in any afl or to keep it separately as every time i get a signal i will have to alter the price manually.

Recently i tried inbuilt technique in amibroker.
(1) go to view in amibroker
(2) click realtimequotes
(3) rightclick on it and click easy alerts
(4) I tried to mention required value but i did not get alert. Can you please set it
Thanks
susheel
 

sudris

Well-Known Member
#5
Dear sudris,
Can we make these type of alerts to alert when price go abv/blw some levels?without any buy/sell signals in afl?means I put one horizontal line and I want alert when price go abv/blw that line........
Hi Vjay,

I do not think that AFL engine is capable to pick the value of any horizontal line if you plot it manually. But if you include the formula to calculate that price value, alerts could be triggered.

Hope this helps.
 

sudris

Well-Known Member
#6
Thanks a lot SUDRIS.
I do not have much knowledge as how an afl works. I want to know whether to put the code in any afl or to keep it separately as every time i get a signal i will have to alter the price manually.

Recently i tried inbuilt technique in amibroker.
(1) go to view in amibroker
(2) click realtimequotes
(3) rightclick on it and click easy alerts
(4) I tried to mention required value but i did not get alert. Can you please set it
Thanks
susheel
As you had said you have signals with Buy Sell values, so I gave the alert based on your signal values.

the code in my earlier post is afl based. you will have to paste it at the end of the afl that is giving you the signals. if your signals are not afl based but based on some external source / external calculation then the previous code may not be of much help.

you can find more information on how to edit or make new afls from the link below.

http://www.amibroker.com/guide/h_indbuilder.html

the other thing you have mentioned "realtime quotes" is a different scenario altogether.
 
#7
HI VIJAY,

I want same afl i not use any indicator for buy or sell if i buy my trg is 100 points and stoploss is 50 to 60 points every call in bank nifty.

if i buy and draw two horizontal line on price chart so can i add sound alert if price go above trg price or below stop loss price if yes so pls give me afl for same.

Thanks
 

Similar threads