read up my earlier postings on a similar issue. i had also posted work around
given by amibroker support.
--- In [email protected], "Mohammed" <softnews2...@...> wrote:
>
> Hi,
>
> I write the following code to plot MACD four hours value in the fifteen
> minute time frame. BUT the value showing it is not equal to the value showing
> in four hours timeframe, I found that the value show in fifteen minute which
> I plot is for the previous bar in 4 hours timeframe.
> -------------
> TimeFrameSet( 4*3600 );
>
> FOUR_HOURS_MACD =MACD();
> FOUR_HOURS_SIGNAL = Signal(12);
>
> TimeFrameRestore();
>
> FOUR_HOURS_MACD =
> TimeFrameExpand(FOUR_HOURS_MACD, 4*3600 );
> FOUR_HOURS_SIGNAL =
> TimeFrameExpand(FOUR_HOURS_SIGNAL, 4*3600 );
>
>
> FOUR_HOURS_MACDValue = StrFormat("4M %g", FOUR_HOURS_MACD,
> SelectedValue( ROC( FOUR_HOURS_MACD, 0 )));
> FOUR_HOURS_SIGNALValue = StrFormat("4S %g", FOUR_HOURS_SIGNAL,
> SelectedValue( ROC( FOUR_HOURS_SIGNAL, 0 )));
>
>
> GfxSelectFont( "Arial", 9, 700 );
> GfxSetBkMode( 3 );
> GfxSetTextColor( colorPaleBlue );
> pxHeight = Status( "pxchartheight" );
> T = pxHeight;
>
> x5 = 172;
> GfxTextOut( FOUR_HOURS_MACDValue , x5, t -85);
> GfxTextOut( FOUR_HOURS_SIGNALValue , x5, t -60);
> --------------
> Any one can explain why it is not showing the latest value. And it shows the
> previous value?
>
> Regards.
> Moh
>