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

RE: [amibroker] help with ATR and Min



PureBytes Links

Trading Reference Links


<SPAN 
class=685475506-02112002>Graham,
ATR 
requires constant data. Your code states ....
<SPAN 
class=685475506-02112002> 
you 
want the to count all the bars
if the 
count is less than 260 use that bar count, else use 260
<SPAN 
class=685475506-02112002> 
you 
could make the period constant by asking for the last value of your calculation. 
It will not be dynamic across your chart but will reflect the last calculation 
taken.......
<SPAN 
class=685475506-02112002> 
<FONT 
color=#282828 size=2>
first=Cum<FONT color=#282828 
size=2>(1<FONT color=#282828 
size=2>);
Period=Min<FONT color=#282828 
size=2>(260<FONT 
color=#282828 size=2>,first);
x=ATR<FONT color=#282828 
size=2>(LastValue<FONT 
color=#282828 face=Arial size=2>(period));
Plot<FONT color=#282828 
size=2>(x,""<FONT color=#282828 
size=2>,colorBlue<FONT 
color=#282828 size=2>,4<FONT 
color=#282828 size=2>); 
 
Jayson 

<FONT face=Tahoma 
size=2>-----Original Message-----From: kaveman 
[mailto:kavemanperth@xxxx]Sent: Friday, November 01, 20029:58 
PMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker] help 
with ATR and Min

<SPAN lang=EN-AU 
>I have tried to use this in an AFL 
and get an error message
<SPAN lang=EN-AU 
>The ATR works fine without the Min 
being used
<SPAN lang=EN-AU 
> 
<FONT color=black 
face="Courier New" size=2><SPAN 
>first=<FONT 
color=blue face="Courier New" size=2><SPAN 
>Cum<FONT 
color=black face="Courier New" size=2><SPAN 
>(<FONT 
color=fuchsia face="Courier New" size=2><SPAN 
>1<FONT 
color=black face="Courier New" size=2><SPAN 
>);
<FONT color=black 
face="Courier New" size=2><SPAN 
>Period=<SPAN 
class=GramE><SPAN 
>Min<FONT 
color=black face="Courier New" size=2><SPAN 
>(<FONT 
color=fuchsia face="Courier New" size=2><SPAN 
>260<FONT 
color=black face="Courier New" size=2><SPAN 
>,first);
<SPAN 
>x=<SPAN 
class=GramE><SPAN 
>ATR<FONT 
color=black face="Courier New" size=2><SPAN 
>(<FONT 
color=black face="Courier New" size=2><SPAN 
>period);
<SPAN 
> 
<SPAN 
>Graham<FONT 
face=Arial size=2><SPAN lang=EN-AU 
>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.