# Values and graph is changing in different time frame

I am a beginner in Amibroker programming and was trying to check different time frame plot. I was just testing with a buy sell startegy in daily timeframe but visualising them in different lower time frame so that in future I can couple daily time frame guidance in a lower time frame BUY SELL Strategy.
Problem is, daily stochastics value is changing when chart’s base time frame is changing. But I thought that daily stochastic chart will look remain same when we plot it in daily or hourly base time frame. For an example –
The first chart is in 1hour time frame and the top pane is for NIFTY, middle one is for basetime frame stochastics (1h) and lower pane is for daily stochastics chart(expanded).
2nd chrt is in daily time frame. here you can see that expanded daily stochastics graph in 1hour base time frame and expanded daily stochastics graph in daily base timeframe is not matching. Mostly check the lower panes in two pics for comparison and I have kept total time duration in both charts almost same for visualisation.
Can any one help me to solve this problem? In my understanding daily stochastics graph should remain same in any time frame. only number of dots should increase to accommodate more lower time frmes.
Not only daily stochastics graph looks so different in different time(1h & 1D) frame but their values are also different for any given date

``````Buy = TimeFrameCompress(Cross(StochK( 22, 2 ),StochD( 22, 2,2 )), inDaily);
Sell = TimeFrameCompress(Cross( StochD(22, 2,2) , StochK(22, 2) ),inDaily);
SetChartOptions(0,chartShowArrows|chartShowDates);
GraphXSpace = 10;
ChartType = ParamList("Chart Type", "Price Chart|Daily|basetimeframe"); //

if (ChartType == "Price Chart")
{
Plot(C,"C",colorBlack,styleCandle);
PlotShapes( shapeUpArrow*Buy, colorGreen, 0, L, -20 );
PlotShapes( shapeDownArrow*Sell, colorRed, 0, H, -20 );//
}

if (ChartType == "Daily") //
{
stochKDaily = TimeFrameExpand( StochK( 22, 2 ), indaily );
Plot(stochKDaily, "stochKDaily", colorYellow,style = styleDots,width=1);
stochDDaily= TimeFrameExpand(StochD( 22, 2,2 ),inDaily);
Plot( stochDDaily, "stochDDaily", colorRed,style = styleDots,width=1 );
}

if (ChartType == "basetimeframe") //
{

Plot( StochK(22,2), "stochK", colorYellow );
Plot( StochD (22,2, 2), "stochD", colorRed );
}

``````

You need to do the other way. Set period to a lower timeframe and then get higher timeframe.
From minute you can go to 5min, 10min, hour, daily, etc

Thanks for your reply sir. This means that I shall keep open daily time frame and will plot 1 hour or 15 min timeframe stochastics in daily frame and will trade on lower time frame signal along with the guidance from Daily signal. I shall try this and will check. Thanks
Samik

Sir today again i tested asper your advice and in 1 min or 5 min or 15min time frame i was plotting 1H stochastic and Daily stochastic. this is fine now but one problem remains same. The values for stochastics are changing as the base time frame is changing and more over, if i plot stochastics using amibroker formula on price, it shows different graph than the plot i get using my AFL. Can you please help on this issue? i think i have some basic understanding problem

This topic Can't get Double Stochastic to work in Multi Time frame (RANGE BARS) is about another problem, but the first post at tha thread , has an example that might help you