{ Downloaded From https://www.WiseStockTrader.com }
{Custom Time Pivot by ANDRE}
{Pivot Rang is used in MARK FISHER trading strategies} 

{this indicator is for daily time frame only}

{in the start & end Date that you specify, you must have a candle in daily time frame otherwise the indicator wont work at all}

sdm:=Input("start day and month [ mmdd ]",1,1235,803);
sx:=Input("start year [ yyyy ]",1970,2460,2014);
edm:=Input("ending day and month [ mmdd ]",1,1235,903);
ex:=Input("ending year [ yyyy ]",1970,2460,2014);

sdt:=(Month()=Int(sdm/100)) AND
(DayOfMonth()=Rnd(Frac(sdm/100)*100)) AND (Year()=sx);
edt:=(Month()=Int(edm/100)) AND
(DayOfMonth()=Rnd(Frac(edm/100)*100)) AND (Year()=ex);

ph:= LastValue( ValueWhen(1, edt, HighestSince(1, sdt, H) ) );
pl:= LastValue( ValueWhen(1, edt, LowestSince(1, sdt, L) ) );
pc:= LastValue( ValueWhen(1, edt, C ) );

start:=If(BarsSince(sdt)>-1, 0, 0);
pp:= ((ph + pl + pc)/3) + start;
g:= (ph + pl)/2;
hh:= g-pp;

pp + hh;
pp;
pp - hh;