| 
 PureBytes Links 
Trading Reference Links 
 | 
Thank you for the suggestion. My problem with that is the cross 
function only returns true on the day of the cross, but I am looking 
for the condition when both are true. If one condition crosses 
yesterday and the other today, I will miss my sell. I am trying to 
get the alert to signal in sync with the backtester, I only want to 
be notified if I am in a long position at the time of the sell. Any 
ideas?
Tom
--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxxx> wrote:
> your sell signal allows too many bars to activate. Try Cross 
function
> to make the signal more unique. Maybe this
> 
> Sell = Ref(ADX(),-10) > ADX() AND Cross(ADX(), ADXPerLong);
> 
> 
> 
> On Sun, 23 Jan 2005 23:17:30 -0000, tkoinaustin <tkoinaustin@xxxx> 
wrote:
> > 
> > 
> > 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
> > 
> > 
> > 
> > 
> > 
> 
> 
> -- 
> Cheers
> Graham
> http://e-wire.net.au/~eb_kavan/
------------------------ Yahoo! Groups Sponsor --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/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/
 
 |