[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=518332716-11062003>Richard,
OK 
this uses the last value of your buy/sell to plot a line (not the cross of the 
price and condition but the condition its self.
<SPAN 
class=518332716-11062003> 
<FONT 
color=#282828> 
prevCl= Ref(Close,-1<FONT 
color=#282828>);<FONT 
color=#008000><FONT 
color=#0000ff>
Buy = prevCl+prevCl*0.35/100<FONT 
color=#0000ff>;<FONT 
color=#000000>
Sell = prevCl-prevCl*0.35/100<FONT 
color=#0000ff>;<FONT 
size=2>
Plot(<FONT 
color=#000000>C<FONT 
color=#282828>,""<FONT 
color=#282828>,4<FONT 
color=#282828>,64<FONT 
color=#282828>);<FONT 
size=2>
Plot(<FONT 
color=#0000ff>LastValue(<FONT 
color=#000000>Buy<FONT 
color=#282828>),"buy"<FONT 
color=#282828>,5<FONT 
color=#282828>,1<FONT 
color=#282828>);<FONT 
size=2>
Plot(<FONT 
color=#0000ff>LastValue(<FONT 
color=#000000>Sell<FONT 
color=#282828>),"Sell"<FONT 
color=#282828>,4<FONT 
color=#282828>,1<FONT 
color=#282828>);
 
this 
creates a custom indicator. If you want to add this to your regular proce plot 
just copy it to the top of the built in price indicator omitting the line that 
says ...  
Plot(<FONT 
color=#000000>C<FONT 
color=#282828>,""<FONT 
color=#282828>,4<FONT 
color=#282828>,64<FONT 
color=#282828>);<FONT 
color=#0000ff>
 
 
Regards, 
Jayson 
<FONT face=Tahoma 
size=2>-----Original Message-----From: Richard Jay 
[mailto:lists@xxxxxxxxxxxxxxxxxx]Sent: Wednesday, June 11, 2003 12:17 
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: Re: [amibroker] 
Use an indicator instead of alertHi 
Jayson,Thanks for your help.I do want a HORIZONTAL LINE plotted 
so I can easily see when the price movesthrough the calculated price.  
I don't want alerts anymore ....  adding thetext you suggested to the 
code I already have just opened a newer windowbelow which is not 
right.R.----- Original Message -----From: JaysonTo: 
amibroker@xxxxxxxxxxxxxxxSent: Wednesday, June 11, 2003 4:57 PMSubject: 
RE: [amibroker] Use an indicator instead of alertRichard,In 
order to plot an indicator you must use the Plot() command. You asked 
forhorizontal lines but did you mean vertical lines to match the 
alertifsignals?? Ff so simply add this to your 
code...Plot(IIf(Buy,1,0),"Buy",5,2);Plot(IIf(Sell,1,0),"Sell",4,2);Regards,Jayson-----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.htmlYour 
use of Yahoo! Groups is subject to the Yahoo! Terms of Service.Yahoo! 
Groups SponsorSend 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.htmlYour 
use of Yahoo! Groups is subject to the Yahoo! Terms of Service.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.