Price crossing level alerts

amitrandive

Well-Known Member
#1
Dear All

I would like an exploration/Scan to scan a group of stocks and to give an alert when the price crosses defined particular levels.

These levels can be changed anytime, on any time frame.

Is this possible ?
 

amitrandive

Well-Known Member
#2
Got this code from the old traderji thread and below is the procedure to use this .

Code:
_SECTION_BEGIN("SR_Xross");
su = Study("SU", GetChartID() );
re = Study("RE", GetChartID() );
PlotOHLC( re, re, su, su, "", colorLightYellow,styleCloud );
AlertIf(Cross(H, Study( "RE",GetChartID())),"SOUND C:\\Windows\\Media\\Notify.wav", "Breakout Buy Alert", 10 );
AlertIf(Cross(Study( "SU",GetChartID()), L),"SOUND C:\\Windows\\Media\\Notify.wav", "Breakdown Sell Alert", 10 );
_SECTION_END();
1)After you include the above code. Plot 2 lines on your chart.

2)Double click on the line to get the property dialog box

3)Select "RE" as StudyID for resistance line

4)Similarly Select "SU" as StudyID for support line

Now place these 2 lines RE & SU wherever you want the buy and sell alert to be sounded at the levels of your choosing,

Only thing is the we need to have the alert on if the screen is minimised.Here is a hint

Try this

HTML:
Instead of plotting lines and using Study IDs, 
use 2 parameters to define support and resistance levels (use Param)
 and setup a buy/sell alert on cross of these levels, this
 should play the sound even if AB is not active window (working in background)
Can any Senior help ??:confused: