To plot Candles on top of the Donchian try;
pds=Param("Donchian",20,1,60,1);
DonchianUpper =HHV(Ref(H,-1),pds);
DonchianLower = LLV(Ref(L,-1),pds);
DonchianMiddle = (DonchianUpper+DonchianLower)/2;
PlotOHLC( Open, High, Low, Close, "", colorBlack,styleCandle ) ;
Plot(DonchianUpper,"DU",colorBlue,styleLine);
Plot(DonchianMiddle,"DM",colorGreen,styleLine);
Plot(DonchianLower,"DL",colorRed,styleLine);
space = DonchianUpper - DonchianLower;
for(i=0;i<BarCount;i++)
{
if(space[i] <= 5){
PlotOHLC( DonchianUpper, DonchianUpper, DonchianLower, DonchianLower,
"", colorYellow,styleCloud);
}}
T.O.
--- In [email protected], "sono_080" <[EMAIL PROTECTED]> wrote:
>
> Hello, i will plot full colourbg between Donchian Channels where the
> space between upper and lower line <= 5 is.
> Dont work cause "space" is a array, can u help me ?
>
> THX!
>
> ***********
> pds=Param("Donchian",20,1,60,1);
> DonchianUpper =HHV(Ref(H,-1),pds);
> DonchianLower = LLV(Ref(L,-1),pds);
> DonchianMiddle = (DonchianUpper+DonchianLower)/2;
> Plot(DonchianUpper,"DU",colorBlue,styleLine);
> Plot(DonchianMiddle,"DM",colorGreen,styleLine);
> Plot(DonchianLower,"DL",colorRed,styleLine);
>
>
> space = DonchianUpper - DonchianLower;
>
> if(space <= 5){
> PlotOHLC( DonchianUpper, DonchianUpper, DonchianLower,
DonchianLower,
> "", colorYellow,styleCloud );
> }
> *********
>