PureBytes Links
Trading Reference Links
|
May I suggest a temporary solution ?
Name your
IIF( CPRbuy, 8, IIF( CPRsell,4, ...)) with Z and write like
DIGIT=2;
GRAPH0=C;
GRAPH0STYLE=64;
Z=IIF(C>REF(C,-1),8,IIF(C==REF(C,-1),11,4));/*Here put your iif*/
GRAPH0BARCOLOR=IIF(DIGIT%2==0,Z,1);
Now, simply write manually after "DIGIT=" 2 or 1 in the first
line, enabling or disabling colors.
It takes a bit more than hit a button, but it takes less than
10 seconds to do it.
Dimitris Tsokakis
--- In amibroker@xxxx, "First Pacific Securities Pty Ltd" <lvl@xxxx>
wrote:
>
> Tomasz,
>
> I have written this indicator to color code the bars for short term
reversal
> patterns.
>
> Any chance that we may be able to have these reversal signals as a
button on
> a toolbar which we may switch on and off to highlight the bars when
we wish?
>
> Also, is it possible to have more than 16 custom colors?
>
> Regards,
> Larry Lovrencic
>
> /*Color Coded Short Term Reversal Signals
> by Larry Lovrencic
>
> Some of the colors may need to change depending on your choice of
background
> color.
> This has been coded for a white background*/
>
> /*Closing Price Reversals*/
> CPRbuy=O<(L+0.2*(H-L)) AND C>(H-0.2*(H-L)) AND H<ref(H,-1) AND L<ref
(L,-1)
> AND C>ref(C,-1);
> CPRsell=O>(L+0.8*(H-L)) AND C<(H-0.8*(H-L)) AND H>ref(H,-1) AND
L>ref(L,-1)
> AND C<ref(C,-1);
>
> /*Hook Reversals*/
> HRbuy=O<(L+0.2*(H-L)) AND C>(H-0.2*(H-L)) AND H<ref(H,-1) AND L>ref
(L,-1);
> HRsell=O>(L+0.8*(H-L)) AND C<(H-0.8*(H-L)) AND H<ref(H,-1) AND L>ref
(L,-1);
>
> /*Island Reversals*/
> IRbuy=ref(L,-2)>ref(H,-1) AND L>ref(H,-1);
> IRsell=ref(H,-2)<ref(L,-1) AND H<ref(L,-1);
>
> /*Key Reversals*/
> KRbuy=O<ref(C,-1) AND L<ref(L,-1) AND C>ref(H,-1);
> KRsell=O>ref(C,-1) AND H>ref(H,-1) AND C<ref(L,-1);
>
> /*Open Close Reversals*/
> OCRbuy=O<(L+0.2*(H-L)) AND C>(H-0.2*(H-L)) AND H<ref(H,-1) AND L<ref
(L,-1)
> AND C<ref(C,-1);
> OCRsell=O>(L+0.8*(H-L)) AND C<(H-0.8*(H-L)) AND H>ref(H,-1) AND
L>ref(L,-1)
> AND C>ref(C,-1);
>
> /*Pivot Point Reversals*/
> PPRbuy=ref(L,-1)<ref(L,-2) AND ref(L,-1)<L AND C>ref(H,-1);
> PPRsell=ref(H,-1)>ref(H,-2) AND ref(H,-1)>H AND C<ref(L,-1);
>
> graph0 = close;
> graph0style = 128;
>
>
> graphxspace=5;
>
> graph0barcolor = IIF( CPRbuy, 8, IIF( CPRsell,4, IIF( HRbuy,10, IIF
(
> HRsell,11, IIF( IRbuy,3, IIF( IRsell,15, IIF( KRbuy,6, IIF(
KRsell,7,
> IIF( OCRbuy,9, IIF( OCRsell,13, IIF( PPRbuy,16, IIF( PPRsell,12,
> 1 ) ) ) ) ) ) ) ) ) ) ) ) ;
>
>
> ch= (close-(ref(close,-1)));
> chpct=ch/ref(c,-1)*100;
>
>
> title =date()+" "+name()+" Open"+writeval(O)+" High"+writeval(H)+"
> Low"+writeval(L)+" Close" + writeval(graph0) + " Previous Close " +
> writeval((ref(graph0,-1))) + "Change=" + writeval(ch)+"
> ("+writeval(chpct,format=1.2)+"%)";
|