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

Re: [amibroker] Plot() question



PureBytes Links

Trading Reference Links

Yes, thanks for catching that.
----- Original Message -----
Sent: Saturday, November 05, 2005 10:55 PM
Subject: Re: [amibroker] Plot() question

Hi,
 
Title color used to match the indicator but it changed a couple of releases back, I think when TJ introduced Drag and Drop along with rotating color cycle for dropped indicators.
 
Using SelectedValue( maDiff ) to set the color would result in a whole range of colors, since the value of maDiff could be just about anything including negative number or decimal number. I think you meant to use SelectedValue( colorMaDiff )?
 
Steve
----- Original Message -----
Sent: Saturday, November 05, 2005 9:56 PM
Subject: Re: [amibroker] Plot() question

Thanks, Graham.  Seems a bit strange to need EncodeColor() when the color variable is specified in Plot().  Is this the way previous versions worked?
 
In any case, when I put your fix into a slightly different formula instead of getting only the two colors specified in IIF() a whole range of colors appears, depending on the selected bar.  Below are two screen shots showing two different unspecified colors for the "MA Difference" name for two different bars.  The plot of maDiff (red and bright green dots) displays the right colors.  However, the color of the name changes through about 8 different colors depending on the bar selected.  The screen shots below show the result for two different bars.  Also, note that a number (color number?) appears in front of the name for some colors but not others (aqua has number but not red).  I have never seen a color number displayed before.  The code below is based on the previous one and produces this effect. 
 
Any idea what is going on and how to get around this?  It seems to me unless there is a setting that affects this behavior, this might be one for support.
 
---------------------------------------------
 

maDiff = MA(C, 50) - MA(C, 200);

colorMaDiff = IIf(maDiff <= 0, colorRed, colorBrightGreen);

Plot(maDiff, EncodeColor(SelectedValue(maDiff)) + " MA Difference", colorMaDiff, styleOwnScale|styleDots);

Plot( C, "", colorWhite, styleBar);

------------------------------------------------

 

----- Original Message -----

From: Graham
Sent: Saturday, November 05, 2005 8:41 PM
Subject: Re: [amibroker] Plot() question

this will change the name of the plot in title, but not the value
 
Plot
(diffMa, EncodeColor(SelectedValue(colorDiffMa))+"diffMa", colorDiffMa, styleLine);

--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://e-wire.net.au/~eb_kavan/ab_write.htm

 
On 11/6/05, wavemechanic <fimdot@xxxxxxxxx> wrote:
I am using version 4.74.6 and have run across something that I have not seen before and that I assume is not a bug.
 
Using the simple code below, the plot correctly displays the right color depending on the value of the variable diffMa.  However, the name in Plot() is a constant color (lime) instead of the color of the plot which is defined in IIF().  (see attached screen shot).  If IIF() is replaced by a color ( e.g, colorRed), the name correctly assumes this color.  The problem occurs only when IIF() is used.  Lime is the up color for candlesticks, but changing this color does not change the color of name on the chart.
 
Are there new settings for controlling the color of name?  Any ideas?
 
Bill
 
----------------------------
 

MA1 =

MA(C, 200);

MA2 =

MA(C, 50);

diffMa = MA1 - MA2;

colorDiffMa =

IIf(diffMa <= 0, colorRed, colorWhite);

Plot

(diffMa, "diffMa", colorDiffMa, styleLine);
 


No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.12.8/162 - Release Date: 11/05/05


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 other support material please check also:
http://www.amibroker.com/support.html





YAHOO! GROUPS LINKS