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

RE: [amibroker] Greetings and a question.



PureBytes Links

Trading Reference Links

Hi Conrad
What you are asking is really covered in the tutorial on AFL language, and
throughout all the help files

"If" (single i ) is used when using script type language and is built in to
AFL without the need to invoke the script language, 
But I think you are needing the IIF statement, examples are in the AFL help
files
You need to assign a variable to the function and join all the conditions
together as below

Xyz = iif( L<ref(L,-3) and L<ref(L,-2 and .....etc , 1,0);
PlotShapes(xyz*shapeHollowCircle, colorBlue, 0, Graph0, -12 ); 


Cheers,
Graham
http://groups.msn.com/ASXShareTrading
http://groups.msn.com/FMSAustralia 

-----Original Message-----
From: Conrad Smith [mailto:conradfsmith3@xxxxxxxxx] 
Sent: Tuesday, 11 November 2003 11:42 AM
To: Amibroker
Subject: [amibroker] Greetings and a question.


I'm new to both your group and Amibroker, so greetings.

I have a bit of a problem writing a guru commentary.

The code:

if (Ref(L, +3) > L) 
  if (Ref(L, +2) > L)
    if (Ref(L, +1) > L)
      if (Ref(L, -1) > L)
        if (Ref(L, -2) > L)
          if (Ref(L, -3) > L)
     	     PlotShapes(shapeHollowCircle, colorBlue, 0, Graph0, -12 ); 


The error:

Error in AFL formula:
Line 1, Column 12:
if (Ref(L, +
----------^

Error 23.
Syntax error


I'm sure the it a true n00b question, but I can't seem to find the answer.
I'm almost of a mind to believe that I can't use logic where a parameter is
expected.

I truly hope not, I rather like Amibroker.


Cheers,
Conrad

________________________________________________________________________
Want to chat instantly with your online friends?  Get the FREE Yahoo!
Messenger http://mail.messenger.yahoo.co.uk


------------------------ 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/ 


------------------------ 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/