PureBytes Links
Trading Reference Links
|
try cross(a,b); instead of greater then or equal to.
----- Original Message -----
From: "tkoinaustin" <tkoinaustin@xxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Sunday, January 23, 2005 6:17 PM
Subject: [amibroker] AlertIf giving too many sell alerts
>
>
> I am exploring the alertif function and am having a problem. I only
> want the alert if the sell is actually triggered fof the current day,
> however the following code, from the AA window, gives a sell alert
> for every symbol in my portfolio unless there is a buy signal that
> day. Any ideas what I am doing wrong. TIA.
>
> Tom
>
>
> ADXPerLong = Optimize("ADXPerLong", 25, 5, 25, 5);
> FixedStop = Optimize ("fixed loss stop", 5, 5, 30, 5);
> RSIhigh = Optimize("RSI High", 70, 70, 90, 5);
>
> PositionSize = 5000;
> Filter = 1;
>
> Buy = ADX() >= ADXPerLong AND ADX() >= HHV(ADX(),10) AND C >= HHV
> (C,10) AND RSI() < RSIhigh;
> Short = 0;
>
> Sell = Ref(ADX(),-10) > ADX() AND ADX() < ADXPerLong;
> Cover = 0;
>
> ApplyStop(stopTypeLoss, stopModePercent, FixedStop, 1, True, 1);
>
> BuyPrice = C - ATR(14)/2;
> ShortPrice = C + ATR(14)/2;
> AlertIf( Buy,"",FullName(),1 );
> AlertIf( Sell,"",FullName(),2 );
>
>
>
>
>
>
>
> Check AmiBroker web page at:
> http://www.amibroker.com/
>
> Check group FAQ at:
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> Yahoo! Groups Links
>
>
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~->
Check AmiBroker web page at:
http://www.amibroker.com/
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> 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/
|