If you insist on writing code, it is time for you to get out the manual and
learn the language (construction, reserved words, arguments and syntax) of
AFL. You ask questions which are at the heart of how to write even the
simplest of code. I solve this one for you:
Plot(RSI(9),"RSI", IIf(Result,colorRed,styleThick|styleDashed)
;
Note the different placement of the | symbol. Try looking up what "|"
means and it will make sense.
Here's a general hint: When you type a reserved word in the formula
editor (such as "IIf" ) and you then add the "(" , you will get the arguments
which you must supply and their order { i.e. type without the "
": "IIf(" and IIf(Condition, TrueArray,
FalseArray will display }. Try it with "Plot(" , "ParamColor"and
"ParamStyle(".
Another hint - can't remember a reserved word? Start to type the
first letter, or several letters, and press <CTRL><Space> {press
both the CTRL and Space keys at the same time}. You will get a drop down
menu of all the possible ways to complete the word and you can select the one
you wish. Of course there is always "F1" available as well.
Take some time and read the manual and pay attention to the requirements
of AFL before calling something a problem. Lots of folks will help you
with coding, but few will be willing to teach you to read.
----- Original Message -----
Sent: Friday, November 06, 2009 10:41
PM
Subject: [amibroker] Problem with PLOT
and IIF
I'm would have:
IIF(Result, Plot RSI in colorRed and
styleThick, colorRed and
styleDashed)
I'm try with that, but is NO GOOD:
Plot(RSI(9),"RSI", IIf(Result,colorRed,|styleThick,styleDashed)
;
Thank You
Merci
YLTech ( Yves L.
)
Le présent message et les documents qui y sont joints sont
réservés exclusivement au destinataire indiqué. Il est strictement interdit
d'en utiliser ou d'en divulguer le contenu. Si vous recevez le présent message
par erreur, veuillez le détruire S.V.P. et nous en aviser immédiatement afin
que nous puissions corriger nos dossiers. Merci.
This message and
the attached documents may contain privileged or confidential information that
are intended to the addressee only. Any unauthorized disclosure is strictly
prohibited. If you happen to receive this message by error, please delete it
and notify us immediately so that we may correct our internal records. Thank
you.
yltech@xxxxxxxxxxxx