PureBytes Links
Trading Reference Links
|
<FONT face=Arial color=#0000ff
size=2>Jim,
You
almost had it. Just string the 2 conditions together in your
IIf......
<FONT face=Arial color=#0000ff
size=2>
col = IIf<FONT color=#282828
size=2>( golong=<FONT
color=#282828 size=2>=1<FONT
color=#282828 size=2>,colorBlue<FONT
color=#282828 size=2>,<FONT face=Arial color=#0000ff
size=2>IIf(stayout==<FONT
face=Arial color=#ff00ff size=2>1<FONT face=Arial color=#282828
size=2>,colorRed<FONT face=Arial
color=#282828 size=2>, <FONT
size=2>colorWhite <FONT face=Arial
color=#282828 size=2>));<FONT
face=Arial color=#0000ff size=2>
Plot(<FONT face=Arial
size=2>C,<FONT
face=Arial color=#ff00ff size=2>""<FONT face=Arial color=#282828
size=2>,Col,styleBar<FONT
face=Arial color=#282828 size=2>);
Regards,Jayson
<FONT face=Tahoma
size=2>-----Original Message-----From: wd
[mailto:wdjd@xxxxxxxx]Sent: Monday, April 26, 2004 8:02
AMTo: amibroker@xxxxxxxxxxxxxxxSubject: [amibroker]
Indicator and Plot helpGroup,I am trying to
convert and plot an indicator I use for trend in anotherprogram, but I'm
having trouble finishing it so it can be plotted. I'mtrying to plot a
price chart where 'golong' is blue, 'stayout' is red andwhite is when
neither condition is true.Below is my crude attempt so far. I left out the
'Plot' part because I don'thave a clue as how to write it, so I don't know
if the indicator itself iswritten properly. Any help would be greatly
appreciated.ThanksJimSma = Param( "Speriod", 4, 3, 6,1
);Mma = Param( "Mperiod", 8, 6, 12,1 );Lma = Param( "Lperiod", 12, 12,
20,1 );Sht= MA( Close, Sma );Mid= MA( Close, Mma );lng= MA( Close,
Lma );Sht1= C > sht;Mid1= Sht > mid;lng1= Mid >
lng;golong= Sht1 + Mid1 + lng1==3;Sht1SO= C < sht;Mid1SO= Sht
< mid;lng1SO= Mid < lng;StayOut=(Sht1SO + Mid1SO +
lng1SO)==3;col = IIf( golong>=1,colorBlue, colorWhite
);col2=IIf(StayOut>=1,colorRed,colorWhite
);Send BUG REPORTS to
bugs@xxxxxxxxxxxxxSend SUGGESTIONS to
suggest@xxxxxxxxxxxxx-----------------------------------------Post
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A
href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check
group FAQ at: <A
href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html
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
Yahoo! Groups Sponsor
ADVERTISEMENT
Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|