Don
**********
**********
// another Way.afl
// background vis a vis MA(c,200);
p = Param("period", 200, 10, 200, 10);
Cond1 = Close > MA(C,p);
Cond2 = Close < MA(C,p);
// Layer 1: this becomes the first or front layer "on top"
Plot(C,"", colorWhite, 64);
// Layer 2: this layer is behind Layer 1
Plot( MA(C,p),"", IIf(Cond1, colorBlue,IIf(Cond2,colorRed,colorBlack)),1);
// Layer 3: plots the false background behind Layer 2, and so on...
Plot(Param("Height",100,1,100,1),"",IIf(Cond1,
colorRed,IIf(Cond2,colorBlue,colorBlack)
),styleArea|styleOwnScale|styleNoTitle|styleNoLabel|styleNoRescale,0,100);
// Layer 4: hides behind the false background layer...
Plot( EMA(C, 30),"", colorYellow,1);
SetChartBkColor(colorBlack);
SetChartOptions(1,0,1);
***************
***************
The order of the plot affects which plot is "in front"
Try moving these around.
This code still hides the selector line because it plots a false
background over it.
My workaround is to adjust the height of the plotted colors.
If there is a better way I look forward to hearing about it.
Regards
ChrisB
Don Lindberg wrote:
>
>
> Chris,
>
> Is there a way to add your code to an existing chart so that it appears
> BEHIND original chart. I have commented out the plot of C, so I only get
> the background color bars and the MA, but when I drag it into an
> existing chart it sits on top, and my original chart is not visible.
> This would be very useful to me if I can solve this problem.
>
>
>
> Thanks,
>
> Don Lindberg
>