PureBytes Links
Trading Reference Links
|
I would like to plot weekly, monthly, quarterly and yearly highs and lows on daily candles. The code immediately below accomplishes this for weekly and monthly data:
//Weekly Plots
WkH = TimeFrameCompress(H,inWeekly,compressHigh);
WkL = TimeFrameCompress(L,inWeekly,compressLow);
WklyH = TimeFrameExpand(WkH,inWeekly,expandFirst);
WklyL = TimeFrameExpand(WkL,inWeekly,expandFirst);
Plot (WklyH,"WklyH",colorBlue,styleStaircase);
Plot (WklyL,"WklyL",colorBlue,styleStaircase);
//Monthly Plots
MnthH = TimeFrameCompress(H,inMonthly,compressHigh);
MnthL = TimeFrameCompress(L,inMonthly,compressLow);
MlyH = TimeFrameExpand(MnthH,inMonthly,expandFirst);
MlyL = TimeFrameExpand(MnthL,inMonthly,expandFirst);
Plot (MlyH,"MnthlyH",colorRed,styleStaircase);
Plot (MlyL,"MnthlyL",colorRed,styleStaircase);
Unfortunately, the quarterly start and end dates are not correctly plotted using similar code.
QtrH = TimeFrameCompress(H,3*inMonthly,compressHigh);
QtrL = TimeFrameCompress(L,3*inMonthly,compressLow);
QlyH = TimeFrameExpand(QtrH,3*inMonthly,expandFirst);
QlyL = TimeFrameExpand(QtrL,3*inMonthly,expandFirst);
Plot(QlyH,"QtrlylyH",colorBrightGreen,styleLine);
Plot(QlyL,"QtrlyL",colorBrightGreen,styleLine);
Would anyone be able to advise me as to how to correctly encode the plotting of the quarterly and yearly highs and lows? It is probably really simple but I have tried a number of approaches without success thus far.
Thank you very much for your time and effort.
Fred
__._,_.___
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
__,_._,___
|