PureBytes Links
Trading Reference Links
|
Hi - Your code is not correct, I think it turns the variable "Style" into a
boolean variable, which is an array and so cannot be used for the style arg.
Try this instead...
if ( LastValue( Cum( High ) ) == LastValue( Cum( Low ) ) )
{
Style = styleLine;
Color = colorBlack;
}
else
{
Style = styleCandle;
Color = IIf( Rs, colorGreen, IIf( Fs, colorRed, colorBlack ));
}
Plot( C, "close", Color, style);
Steve
----- Original Message -----
From: "Thomas Ludwig" <Thomas.Ludwig@xxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Friday, December 15, 2006 3:00 AM
Subject: Re: [amibroker] Different chart styles in one pane?
> Hello guys,
> Thanks a lot for your help! I chose Steve's suggestion and it works great.
> However I noticed a possible inconsistency when I extended that version:
> My
> original Plot-Statement was
>
> Plot( C, "close", IIf( Rs, colorGreen, IIf( Fs, colorRed, colorBlack )),
> StyleCandle);
>
> Now I modified Steve's suggestion a bit like this::
>
> if ( LastValue( Cum( High ) ) == LastValue( Cum( Low ) ) )
> Style = styleLine AND
> Color = colorBlack;
> else
> Style = styleCandle AND
> Color = IIf( Rs, colorGreen, IIf( Fs, colorRed, colorBlack ));
>
> Plot( C, "close", Color, style);
>
> The first Color statement (for line charts) works perfect, but for the
> second
> Color statement (for candlecharts) I get the following error:
>
> Error 5.
> Argument #4 has incorrect type (the function expects different argument
> type
> here)
>
> Isn't that strange, given the fact that the second Color statement was
> included in the original Plot() where it worked flawlessly?
>
> Greetings,
> Thomas
>
>
> Please note that this group is for discussion between users only.
>
> To get support from AmiBroker please send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> For other support material please check also:
> http://www.amibroker.com/support.html
>
> Yahoo! Groups Links
>
>
>
>
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.15.20/588 - Release Date: 12/15/2006 10:02 AM
|