PureBytes Links
Trading Reference Links
|
Hi Terry and thanks for the reply
I must be missing something. "PP" is the calculation of the pivot.
What do you mean by saying "actual"? Even if I remove the dotted line
and let the pivot draw as a simple line, it will still don't color
properly.
Thanks for the help and i appreciate any help you can provide
Costas
--- In amibroker@xxxxxxxxxxxxxxx, "Terry" <MagicTH@xxx> wrote:
>
> Costas,
>
>
>
> I don't see where you apply the same logic to any dotted line.
>
>
>
> Try this:
>
>
>
> Color = IIf(PP
> >Ref(PP,-1),colorBrightGreen,IIf(PP<Ref(PP,-1),colorDarkRed,colorWhite))
> ;
>
> Plot(PP, "",color,styleDots+styleNoLabel);
>
> Plot(xxx,"",color,stylexyz); //Where this is your "actual pivot" plot
>
> --
>
> Terry
>
>
>
> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
> Behalf Of cyclicaltrader
> Sent: Sunday, August 13, 2006 16:47
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Colored Lines
>
>
>
> Hi,
>
>
>
> I took a piece of code I found in the AFL library and modified it to
>
> add coloring. For some reason something doesn't work right.
>
>
>
> The code is the following:
>
>
>
> ---------------------------------------
>
>
>
> WeekH = TimeFrameGetPrice("H", inWeekly, -1);
>
> WeekL = TimeFrameGetPrice("L", inWeekly, -1);
>
> WeekC = TimeFrameGetPrice("C", inWeekly, -1);
>
> WeekO = TimeFrameGetPrice("O", inWeekly);
>
>
>
> PP = (WeekH + WeekL + WeekO + WeekO) / 4 ;
>
>
>
> Plot(PP, "",IIf(PP >Ref(PP,-1),colorBrightGreen,
>
> IIf(PP<Ref(PP,-1),colorDarkRed,colorWhite)),styleDots+styleNoLabel);
>
>
>
> -------------------------------------------
>
>
>
> The line changes from red to green and visa versa depending if the
>
> weekly pivot is higher (or lower) than last week's pivot. But the
>
> dotted line (which is the actual pivot) doesn't hold the green or red
>
> color. The "colorwhite" was added just to complete the IIF statement.
>
>
>
> The pivot should be either red or green.
>
>
>
> Thanks in advance
>
>
>
> Costas
>
>
>
>
>
>
>
>
>
>
>
> 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
>
>
>
> http://groups.yahoo.com/group/amibroker/
>
>
>
> amibroker-unsubscribe@xxxxxxxxxxxxxxx
>
>
>
> http://docs.yahoo.com/info/terms/
>
|