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

Re: [amibroker] Re: AFL help please: linearray.



PureBytes Links

Trading Reference Links

Here's what I got when hitting F1 after the error was highlighted.  It may mean one of your variables is a string
instead of a close,open high etc.

Error 5. Argument #1 has incorrect type (the function expects different argument type here)

This error occurs when argument passed during function call has invalid type. For example when you pass string instead of array

MA( "test", 5 ); // wrong, Moving average expects array as first argument
AddColumn("Test", "Caption"); // wrong, AddColum expects array as first argument

AddTextColumn("Test", "Caption"); // correct, AddTextColumn expects text

Below is what Bob wrote you. Notice there's only 4 variables compared to
your 6.

Linearray needs two each X and Y points and rightfully complained when you
fed it two Y arrays.

The code editor in 4.69 catches that Arg #4 has incorrect type, but that's
also true for Arg #2.

Was there a reason why you used LineArray(x0,y0,x1,y1, 0, 1) in place of the
default LineArray(x0,y0,x1,y1)?

 







Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html



Yahoo! Groups Sponsor
ADVERTISEMENT


Yahoo! Groups Links