[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=150030018-11062003>Hmm,
Well I 
guess you would need to use one of the time functions. If you looked for close 
data during the last hour of trading (hour==16) you could then use the lastvalue 
of close for when that condition is true.....
<SPAN 
class=150030018-11062003> 
<FONT 
size=2> 
<SPAN 
class=150030018-11062003>x=ValueWhen(Hour()==16,C<FONT 
face=Arial size=2>);
prevCl= LastValue(x);
 
you will need to ad 
the "X" line and change the prevCL line.  I have not tested this but it 
should get you started...
 
 
Regards, 
Jayson 
<FONT face=Tahoma 
size=2>-----Original Message-----From: Richard Jay 
[mailto:lists@xxxxxxxxxxxxxxxxxx]Sent: Wednesday, June 11, 2003 12:53 
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: Re: [amibroker] 
Use an indicator instead of alertThankyou Jayson, your 
code works perfectly.However now I discover that the "math" is wrong 
!!  I want to plot this onan intraday chart, but the "prevCl" should be 
yesterdays closing price ...is this possible??  This all works fine if 
I just view the daily chart, butthat's not the point of the exercise 
:))  Can I force AB to look atyesterdays close when working on intraday 
data ??  If so, how ?R----- Original Message -----From: 
JaysonTo: amibroker@xxxxxxxxxxxxxxxSent: Wednesday, June 11, 2003 5:30 
PMSubject: RE: [amibroker] Use an indicator instead of 
alertRichard,OK this uses the last value of your buy/sell to 
plot a line (not the crossof the price and condition but the condition its 
self.prevCl= Ref(Close,-1);Buy = prevCl+prevCl*0.35/100;Sell 
= 
prevCl-prevCl*0.35/100;Plot(C,"",4,64);Plot(LastValue(Buy),"buy",5,1);Plot(LastValue(Sell),"Sell",4,1);this 
creates a custom indicator. If you want to add this to your regularproce 
plot just copy it to the top of the built in price indicator omittingthe 
line that says 
...Plot(C,"",4,64);Regards,JaysonSend 
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.