It is possible for you to write an Ab plugin that parses metastock codes and
generate afl if you really want it.

  _____  

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Ton Sieverding
Sent: Tuesday, 20 February 2007 7:50 PM
To: [email protected]
Subject: Re: [amibroker] Help with coding PREV alternative




Would be nice to have a MetaStock converter Tool in AFL Editor, he ...
 
Ton.
 

----- Original Message ----- 
From: Keith  <mailto:[EMAIL PROTECTED]> Osborne 
To: [EMAIL PROTECTED] <mailto:[email protected]> ps.com 
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


 

Reply via email to