It's not perfect, but maybe a starting point. You could use TimeFrame
functions with the PlotOHLC function using styleCloud:
tfSec =
in5Minute;
TimeFrameSet(tfSec);
dopen = O;
dhigh = H;
dlow =
L;
dclose = C;
TimeFrameRestore();
dopen2 =
TimeFrameExpand(dopen,tfSec, expandFirst);
dhigh2 =
TimeFrameExpand(dhigh,tfSec, expandFirst);
dlow2 =
TimeFrameExpand(dlow,tfSec, expandFirst);
dclose2 =
TimeFrameExpand(dclose,tfSec, expandFirst);
dbodytop =
Max(dopen2,dclose2);
dbodybot = Min(dopen2,dclose2);
//
Plot higher timeframe candle body, color based on close up or
down.
PlotOHLC(dbodytop,dbodytop,dbodybot,dbodybot,"tfSec",IIf(dopen2
< dclose2, colorGreen,colorOrange),styleCloud);
// Plot higher
timeframe candle top
wick.
PlotOHLC(dbodytop,dhigh2,dbodytop,dhigh2,"twick",colorLightBlue,styleCloud);
//
Plot higher timeframe candle bottom
wick.
PlotOHLC(dbodybot,dbodybot,dlow2,dlow2,"bwick",colorLightBlue,styleCloud);
Regards,
David
---
In amibroker@xxxxxxxxxps.com,
"huanyanlu" <huanyan2000@...> wrote:
>
> In one minute
candlestick chart, also showing the 5-minute candlesticks. 5-minute
candlesticks are wider than one minuite candlesticks, each 5-minuite
candlesticks engulfing 5 one-minuite bars.
>
> The challenge is ,
both M1 and M5 candlesticks showing clearing, with M5 color paler than M1 bars
, since this is mainly a M1 chart.
>
>
> Is Amibroker
ablt to do this ? Which AFL function to use ?
>
> thanks/
huanyan
>