I want to plot a moving average of stock/sensex over a 10 day period. I've tried using Plotforeign in AB, but it does'nt work.
Look at the syntax of Plotforeign:
PlotForeign( tickersymbol, name, barcolor, style = styleCandle |
styleOwnScale, minvalue = {empty}, maxvalue = {empty}, XShift = 0 )
You should use styleOwnScale, so that the second script is plotted on its own scale.
Also how to plot the weekly chart so that both weekly and daily are visible in 2 panes?
I think this is not possible to have it in single layout. Do this:
1) Open daily chart and save it as one layout, say dailyLayout.
2) Open weekly chart and save it as, say weeklyLayout.
Now you can easily switch between two layouts.
If this is not you are looking for, try using timeframe...() functions. Please refer to Amibroker User Guide, which has perfect documentation for these functions.
Let me know if I'm wrong anywhere.
Praveen.