i have a Daily chart open with prices. i have programatically plotted the weekly macd histo using the following formula. basically using timeframeset and timeframerestore. pl note i have set the title within the timeframe set block.
however the title shows the daily data. the macd chart itself is displaying weekly histo. i verified it. how do i trick the system to show the correct bartime based on the actual plot data and in this case weekly to be displayed. the screenshot shows the issue http://www.screencast.com/users/junkone/folders/Jing/media/e8d2c670- aac5-4e36-bfe2-98b2f5866aa5 if(getIntervalparam != "default"){ TimeFrameSet( IntervaltoUse); } _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi % g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C) ) ; //MACD - Moving Average Convergence Divergence v1 //adapted from code by Tomasz Janeczko //ideas by Graham Kavanagh and Terry Magic r1 = Param( "Fast avg", 12, 2, 200, 1 ); r2 = Param( "Slow avg", 26, 2, 200, 1 ); r3 = Param( "Signal avg", 9, 2, 200, 1 ); m1 = MACD(r1, r2); s1 = Signal(r1,r2,r3); difference = m1-s1; Plot( m1, StrFormat(_SECTION_NAME()+"(%g,%g)", r1, r2), ParamColor ("MACD color", colorRed ), ParamStyle("MACD style") ); Plot( s1, "Signal" + _PARAM_VALUES(), ParamColor("Signal color", colorBlue ), ParamStyle("Signal style") ); Plot( difference,"MACD", colorBlack, styleLine | styleThick); Color=IIf(difference > 0,colorGreen,colorRed); Plot(difference, "MACD Histogram", Color, styleNoTitle | ParamStyle ("Histogram style", styleHistogram | styleThick | styleNoLabel, maskHistogram ) ); Plot(difference, "", colorBlack, styleNoTitle|styleLine | styleThick | styleNoLabel ); PlotGrid(0, colorBlack);//, styleNoTitle|styleLine | styleThick | styleNoLabel ); width=Status("pxchartwidth" ) ; Height=Status("pxchartheight" ) ; GfxSelectPen( colorRed, 1 ); GfxSelectSolidBrush( colorCustom1 ); GfxSelectFont("Tahoma",15, 700 ); GfxSetBkMode(1); GfxSetTextColor(colorGreen); //GfxTextOut(Name() + " Close " + NumToStr(LastValue(C)) , x, y) ; GfxTextOut( "Current MACD INTERVAL SHOWN" + getIntervalparam , width/2, Height/2); if(getIntervalparam != "default"){ TimeFrameRestore() ;
