PureBytes Links
Trading Reference Links
|
You may need to use Lastvalue, I found it worked in this
<font size=2 color=red
face="Courier New">for<span
lang=EN-AU >( i = <font
color=fuchsia face="Courier New">1<span
lang=EN-AU >; i <= numline; i++
)
<font size=2 color=black
face="Courier New">{
<font size=2 color=black
face="Courier New">ResBase = <span
lang=EN-AU >LastValue<font
color=black face="Courier New">(<span
lang=EN-AU >Peak<font
color=black face="Courier New">(Base,Percent,i));
<font size=2 color=black
face="Courier New">SupBase = <span
lang=EN-AU >LastValue<font
color=black face="Courier New">(<span
lang=EN-AU >Trough<font
color=black face="Courier New">(Base,Percent,i));
<font size=2 color=blue
face="Courier New">Plot<span
lang=EN-AU >(<font
color=blue face="Courier New">ValueWhen<span
lang=EN-AU >( ResBase==Base, <font
color=blue face="Courier New">HHV<span
lang=EN-AU >(<font
color=red face="Courier New">H<span
lang=EN-AU >,HHVperiod) ), <font
color="#cc4466" face="Courier New">"Resist Level"<font color=black
face="Courier New">, <span
lang=EN-AU >colorRed<font
color=black face="Courier New">, <span
lang=EN-AU >styleLine<font
color=black face="Courier New">);
<font size=2 color=blue
face="Courier New">Plot<span
lang=EN-AU >(<font
color=blue face="Courier New">ValueWhen<span
lang=EN-AU >( supbase==Base, <font
color=blue face="Courier New">LLV<span
lang=EN-AU >(<font
color=red face="Courier New">L<span
lang=EN-AU >,HHVperiod) ), <font
color="#cc4466" face="Courier New">"Support Level"<font color=black
face="Courier New">, <span
lang=EN-AU >colorGreen<font
color=black face="Courier New">, <span
lang=EN-AU >styleLine<font
color=black face="Courier New">);
<span
lang=EN-AU >}
<font size=3 color=teal
face="Times New Roman">Cheers,
Graham
<font size=2
color="#339966" face="Times New Roman"><font
color="#339966">http://groups.msn.com/ASXShareTrading
<font size=2
color="#339966" face="Times New Roman"><font
color="#339966">http://groups.msn.com/FMSAustralia
<span
>-----Original Message-----
From: Ara Kaloustian
[mailto:ara1@xxxxxxxxxx]
Sent: Wednesday, 30 April 2003
2:48 PM
To: AmiBroker - BB
Subject: [amibroker] if function
<font size=2
face="Times New Roman">
<span
>I am trying to plot a shape based on
certain conditions
<font size=2
face="Times New Roman">
<span
>Example
<font size=2
face="Times New Roman">
<span
>x
= stochD(14);
<span
>CurrentBar = BarsSince(Cum(1)
== 1);
<font size=2
face="Times New Roman">
<span
>If (x[CurrentBar] > 80)
<span
>{
<span
>(PlotShapes(....
<span
>}
<font size=2
face="Times New Roman">
<span
>The problem I have is that x is an
array ... need to use a single number or single array element ... and its
subscript has to be a numeric value (can not use CurrentBar).
<font size=2
face="Times New Roman">
<span
>Anyone with a workaround for this?
<font size=2
face="Times New Roman">
<span
>Thanks
<font size=2
face="Times New Roman">
<span
>Ara
<font size=2
face="Times New Roman">
Send
BUG REPORTS to bugs@xxxxxxxxxxxxx<span
>
Send 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.
|