Topic: Smaller timeframes and Top Bottom indicator

I added "Previous 1hr" to price base and worked fine

IndParam.ListParam[2].Caption = "Base period";
            IndParam.ListParam[2].ItemList = new[] { "Previous bar", "Previous 1hr", "Previous day", "Previous week", "Previous month" };

then add

case 1: // Previous 1hr
                    bIsPeriodChanged = Time[bar].Hour != Time[bar - 1].Hour;
                    break;

But How To Add 4hr , 30Minutes , 15 Mins !!!!!

Re: Smaller timeframes and Top Bottom indicator

TimeSpan maybe? http://msdn.microsoft.com/en-us/library … .110).aspx

Re: Smaller timeframes and Top Bottom indicator

i tried Convert unit
bIsPeriodChanged = Time[bar].ConvertUnits(60, MINUTE, HOUR) != Time[bar - 1].ConvertUnits(60, MINUTE, HOUR);

But didnot work !!!!!

Re: Smaller timeframes and Top Bottom indicator

Also i tried

bIsPeriodChanged = Time[bar].DataPeriod.M15 != Time[bar - 1].DataPeriod.M15; But not working !!!

Re: Smaller timeframes and Top Bottom indicator

Here is Top Bottom with 1 hr base price !  waiting some body to code other smaller time frames ( 4hrs, 30mins,.....)

Thanks in advance

http://forexsb.com/repository/repository_indicators/forex_indicator_review/155/topbottom-indicator