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

RE: [amibroker] Use an indicator instead of alert



PureBytes Links

Trading Reference Links




<SPAN 
class=595325415-11062003>Richard,
In 
order to plot an indicator you must use the Plot() command. You asked for 
horizontal lines but did you mean vertical lines to match the alertif signals?? 
F<SPAN 
class=595325415-11062003>f so simply add this to your 
code...
<FONT 
color=#0000ff size=2> 
Plot(<FONT color=#0000ff 
size=2>IIf(<FONT color=#000000 
size=2>Buy,<FONT color=#ff00ff 
size=2>1,<FONT color=#ff00ff 
size=2>0),<FONT color=#ff00ff 
size=2>"Buy",<FONT color=#ff00ff 
size=2>5,<FONT color=#ff00ff 
size=2>2);<FONT color=#0000ff 
size=2>
Plot(<FONT color=#0000ff 
size=2>IIf(<FONT color=#000000 
size=2>Sell,<FONT color=#ff00ff 
size=2>1,<FONT color=#ff00ff 
size=2>0),<FONT color=#ff00ff 
size=2>"Sell",<FONT color=#ff00ff 
size=2>4,<FONT color=#ff00ff 
size=2>2);
 
 
Regards, 
Jayson 
<FONT face=Tahoma 
size=2>-----Original Message-----From: Richard Jay 
[mailto:lists@xxxxxxxxxxxxxxxxxx]Sent: Wednesday, June 11, 2003 8:27 
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] Use an 
indicator instead of alertI previously was given the 
AFL below which works fine .. but I think itwould work better as an 
indicator ... two horizontal lines plotted on theprice chart.  How do I 
plot this is an indicator ??  I copied it onto theCustom Indicator 
section but it opened a new empty panel:prevCl= 
ref(close,-1);//buy if current close crosses above previous close 
rule...Buy = Cross( close, prevCl+prevCl*0.35/100 );//sell if 
current close crosses below previous close rule...Sell = 
Cross(prevCl-prevCl*0.35/100, 
close);AlertIf(Buy,"","BUY",0,15,1);AlertIf(Sell,"","SELL",0,15,2);Send 
BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
suggest@xxxxxxxxxxxxx-----------------------------------------Post 
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
group FAQ at: <A 
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Your use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor












Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.