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

Re: [amibroker] help!!!!!



PureBytes Links

Trading Reference Links

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alex,
	check the manuals for the (usually slight) differences between AFL and MS 
functions

Eg:
AFL	Zig(ARRAY, change)
	change is a factor ie 0.05 is 5%

MS	Zig(ARRAY, change, method)
	change is a number whoose meaning depends on 'method'
	method is either "%" or "$"

AFL	ValueWhen(Expression, ARRAY, n)
	Expression is the condition (eg x>y)
	ARRAY is the value to return
	n -- which occurance, 1 is the most recent, 2, the one before...

MS	ValueWhen(n, Expression, ARRAY)
	The individual bits have the same meaning as in AFL, but the order is 
different.

Try changing your formulas from the MS versions to the AFL version and see if 
that fixes your problems.  It's amazing how much RTFM can help :-)

Hint, the equivalent to MS's input() is AFL's param()

- -- 
	Nigel

On Fri, 14 Nov 2003 07:57 am, alex huynh wrote:
> I tried AFL and I got stuck
>
> input AB:
>
> //Divergence Formulas
> EKA=3;
> I1=Zig(CCI(14),EKA,%)>Ref(Zig(CCI),EKA,%),-1) AND
> Ref(Zig(CCI(14),EKA,%),-1)<Ref(Zig(CCI(14),EKA,%),-2);
> V1=ValueWhen(1,I1,Ref(Zig(CCI(14),EKA,%),-1));
> V2=ValueWhen(1,I1,Ref(C,-1));
> V3=ValueWhen(2,I1,Ref(Zig(CCI(14),EKA,%),-1));
> V4=ValueWhen(2,I1,Ref(C,-1));
> C1=V1>V3 AND V2<V4;
> C1 AND Ref(C1,-1)=0 AND CCI(14)>Ref(CCI(14),-1);
>
> //Double successive divergence
> I1=Zig(CCI(14),3,%)>Ref(Zig(CCI(14),3,%),-1) AND
> Ref(Zig(CCI(14),3,%),-1)<Ref(Zig(CCI(14),3,%),-2);
> V1=ValueWhen(1,I1,Ref(Zig(CCI(14),3,%),-1));
> V2=ValueWhen(1,I1,Ref(C,-1));
> V3=ValueWhen(2,I1,Ref(Zig(CCI(14),3,%),-1));
> V4=ValueWhen(2,I1,Ref(C,-1));
> V5=ValueWhen(3,I1,Ref(Zig(CCI(14),3,%),-1));
> V6=ValueWhen(3,I1,Ref(C,-1));
> C1=V1<V3 AND V2>V4 AND V3<V5 AND V4>V6;
> C1 AND Ref(C1,-1)=0 AND CCI(14)>Ref(CCI(14),-1);
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/tAbGBbmcM2pfckkRAqj8AKCNQIOHMj4hYV7n8+XmoRdaLZgJXgCdH1h/
rUvydD8vot0JkhACMOQpiE0=
=waaY
-----END PGP SIGNATURE-----


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

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 http://docs.yahoo.com/info/terms/