[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] AlertIf Problem



PureBytes Links

Trading Reference Links

Hi All,

I have the following code that almost works. I need help.

1. I set use filter = watchlist with all the symbols in the code below.
2. If I manually scan the afl, all the symbols work except xlf.
Why would that happen?? I have tried it many times, and have checked the horizontal support and resistance levels and studyID code.
3. If I scan and then check run every 1min, I get NO alerts.
What is the correct sequence to tell the afl to look for alerts every 1min. Is it suppose to run in the scan mode? Do I just check run every 1min or what? That did't work.
4. Do I need to change settings in AA.

Short = 0; Cover = 0;

if ( Name() == "mdy" )
{
Buy = Cross(C,Study("MR",1243)) ;  // MR = MDY Horizontal RES. 
Sell = Cross(Study("MS",1243),C) ; // MS = MDY Horizontal SUP.
AlertIf(Buy,"SOUND C:\\Windows\\Media\\Ding.wav","mdy buy",1);
AlertIf(Sell,"SOUND C:\\Windows\\Media\\Ding.wav","mdy sell",2);
}

if ( Name() == "spy" )
{
Buy = Cross(C,Study("SR",1243)) ; 
Sell = Cross(Study("SS",1243),C) ; 
AlertIf(Buy,"SOUND C:\\Windows\\Media\\Ding.wav","spy buy",1);
AlertIf(Sell,"SOUND C:\\Windows\\Media\\Ding.wav","spy sell",2);
}

if ( Name() == "qqqq" )
{
Buy = Cross(C,Study("QR",1243)) ;  
Sell = Cross(Study("QS",1243),C) ;
AlertIf(Buy,"SOUND C:\\Windows\\Media\\Ding.wav","qqqq buy",1);
AlertIf(Sell,"SOUND C:\\Windows\\Media\\Ding.wav","qqqq sell",2);
}

if ( Name() == "iwm" )
{
Buy = Cross(C,Study("IR",1243))  ;  
Sell = Cross(Study("IS",1243),C) ;  
AlertIf(Buy,"SOUND C:\\Windows\\Media\\Ding.wav","iwm BUY",1);
AlertIf(Sell,"SOUND C:\\Windows\\Media\\Ding.wav","iwm SELL",2);
}

if ( Name() == "dia" )
{
Buy = Cross(C,Study("DR",1243)) ;  
Sell = Cross(Study("DS",1243),C) ; 
AlertIf(Buy,"SOUND C:\\Windows\\Media\\Ding.wav","dia buy",1);
AlertIf(Sell,"SOUND C:\\Windows\\Media\\Ding.wav","dia sell",2);
}

if ( Name() == "xlf" )
{
Buy = Cross(C,Study("XR",1243)) ;  
Sell = Cross(Study("XS",1243),C) ; 
AlertIf(Buy,"SOUND C:\\Windows\\Media\\Ding.wav","xlf buy",1);
AlertIf(Sell,"SOUND C:\\Windows\\Media\\Ding.wav","xlf sell",2);
}





------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/