PureBytes Links
Trading Reference Links
|
Would be nice to have a MetaStock converter Tool in AFL Editor, he ...
Ton.
----- Original Message -----
From: Keith Osborne
To: amibroker@xxxxxxxxxxxxxxx
Sent: Tuesday, February 20, 2007 4:53 AM
Subject: [amibroker] Help with coding PREV alternative
Hi, I am attempting to convert a Metastock formula with a PREV
statement. I have read a number of messages in Amibroker database and my
attempt is as follows.
IH_Periods = Param("Initial High", 21, 10, 100,1);
HH = IH_Periods - 1;
Z = HHV(H,HH);
Z = 0; // Initialize
for(i=1;i<BarCount;i++)
{
PREV = Z[i-1]; // PREV is previous value of Z.
}
When I use PREV in a AB formula such as iif(A > B, XX, PREV) I get 0
(Zero) when A<B.......rather than the previous value of Z. Can I assign
a HHV to Z?)
I hope I have explained this.
Any help would be appreciated.
TIA .... Keith
Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.441 / Virus Database: 268.18.3/693 - Release Date: 2/19/2007 5:01 PM
|