hi,I am posting one afl for drawing different time frames in one chart in different panes, simply drag and drop the afl into different panes and right click and select Parameters and then the time frame say Monthly,weekly or daily on daily data.
/*This will Plot monthly, weekly, AND daly charts in one chart but different panes. */
//==============================================================================================
SetChartBkGradientFill(colorWhite,colorLightGrey,colorWhite);
Period= ParamList("Base","Daily|Weekly|Monthly",0);
if(Period=="Monthly"){
TimeFrameSet(inMonthly);
PlotOHLC(Open, High, Low, Close, "Monthly Price Chart", colorBlack, style = styleCandle | styleOwnScale);
Plot(V,"Volume",colorWhite, styleHistogram);
}
if(Period=="Weekly"){
TimeFrameSet(inWeekly);
PlotOHLC(Open, High, Low, Close, "weekly Price Chart", colorBlack, style = styleCandle | styleOwnScale);
Plot(V,"Volume",colorWhite, styleHistogram);
}
if(Period=="Daily"){
TimeFrameSet(inDaily);
PlotOHLC(Open, High, Low, Close, "Daily Price Chart", colorBlack, style = styleCandle | styleOwnScale);
Plot(V,"Volume",colorWhite, styleHistogram);
}
/*This will Plot monthly, weekly, AND daly charts in one chart but different panes. */
//==============================================================================================
SetChartBkGradientFill(colorWhite,colorLightGrey,colorWhite);
Period= ParamList("Base","Daily|Weekly|Monthly",0);
if(Period=="Monthly"){
TimeFrameSet(inMonthly);
PlotOHLC(Open, High, Low, Close, "Monthly Price Chart", colorBlack, style = styleCandle | styleOwnScale);
Plot(V,"Volume",colorWhite, styleHistogram);
}
if(Period=="Weekly"){
TimeFrameSet(inWeekly);
PlotOHLC(Open, High, Low, Close, "weekly Price Chart", colorBlack, style = styleCandle | styleOwnScale);
Plot(V,"Volume",colorWhite, styleHistogram);
}
if(Period=="Daily"){
TimeFrameSet(inDaily);
PlotOHLC(Open, High, Low, Close, "Daily Price Chart", colorBlack, style = styleCandle | styleOwnScale);
Plot(V,"Volume",colorWhite, styleHistogram);
}
Last edited: