/*[[ Name := t3_Bulls_Bears_Burst Author := Copyright © 2004, David W Honeywell Link := DavidHon@msn.com Separate Window := Yes First Color := Yellow First Draw Type := Line First Symbol := 217 Use Second Data := Yes Second Color := Coral Second Draw Type := Line Second Symbol := 218 ]]*/ Input : Bull_Period(5),Bear_Period(5),t3_period(156),b(0.618),BeginBars(2000); Variable : t3(0),shift(0),med(0); Variable : b2(0),b3(0); Variable : c1(0),c2(0),c3(0),c4(0); Variable : e1(0),e2(0),e3(0),e4(0),e5(0),e6(0); Variable : M1(0),M2(0),n(0),w1(0),w2(0); b2=b*b; b3=b2*b; c1=-b3; c2=(3*(b2+b3)); c3=-3*(2*b2+b+b3); c4=(1+3*b+b3+3*b2); n=t3_period; if n<1 then n=1; n = 1 + 0.5*(n-1); w1 = 2 / (n + 1); w2 = 1 - w1; SetLoopCount(0); For shift = BeginBars Downto 0 Begin SetIndexValue(shift, 0); M1= (iBullsPower(Bull_Period,PRICE_CLOSE,shift) +iBearsPower(Bear_Period,PRICE_CLOSE,shift)); M2= (iBullsPower(Bull_Period,PRICE_CLOSE,shift+1) +iBearsPower(Bear_Period,PRICE_CLOSE,shift+1)); med = M1-M2; e1 = w1*med + w2*e1; e2 = w1*e1 + w2*e2; e3 = w1*e2 + w2*e3; e4 = w1*e3 + w2*e4; e5 = w1*e4 + w2*e5; e6 = w1*e5 + w2*e6; t3 = c1*e6 + c2*e5 + c3*e4 + c4*e3; SetIndexValue(shift,t3*1000000); SetIndexValue2(shift,0.0000001); End;