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

Re: [amibroker] Robert Krausz's Weekly Balance Step



PureBytes Links

Trading Reference Links


Hello,
 
First if you want an approximation which works the 
very same way as your MS code but
doesn't need PREV function here is the 
one:
 
graph0 =close;graph1 = ValueWhen(DayOfWeek() 
== 5, ma(CLOSE, 22) 
);graph0style=4+128;graph0color=36;graph1color=5;graph1style=4+512;
 
 
Note that ValueWhen in this code replaces 
perfectly PREV and doesn't have
performance drawbacks of PREV.
 
For real week-mode calculation from dailydata you 
would need to use JScript.
 
Best regards,Tomasz Janeczko===============AmiBroker - the 
comprehensive share manager.<A 
href="">http://www.amibroker.com
<BLOCKQUOTE 
>
----- Original Message ----- 
<DIV 
>From: 
First Pacific 
Securities Pty Ltd 
To: <A title=amibroker@xxxxxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx 
Sent: Wednesday, August 01, 2001 12:37 
AM
Subject: [amibroker] Robert Krausz's 
Weekly Balance Step

<FONT color=#000000 
size=2>Hello,
 
Can anyone help me with an 
indicator I am trying to program.
 
It is Robert Krausz's Weekly 
Balance Step. It is a five-week moving average of the weekly closes 
(Friday-to-Friday only) and is displayed on a daily chart.
 
I couldn't think of how to 
write it in MS language to use just the weekly Friday close, but came up with 
this:
 
If(( DayOfWeek()=5),  
Mov(CLOSE, 22, S) ,  PREVIOUS )  (This is a close 
approximation)
 
Here is what I came up with 
for Amibroker, but it doesn't function:
 
graph0 =close;graph1 = 
IIF(( Dayofweek()=5 ),ma(CLOSE, 22) ,  PREVIOUS 
);graph0style=4+128;graph0color=36;graph1color=5;graph1style=4+512;
 
There doesn't seem to be a 
PREVIOUS fn available.
 
Can anyone 
help?
 
Thanks,
Larry
 
 
 
 
 
<A 
href=""> 
<A href="" 
 > <A 
href="">
<A target=_top 
href=""> 
 Your 
use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service.