PureBytes Links
Trading Reference Links
|
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
>
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/
// 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);
|