Disliked{quote} sorry to bother you again.... My result was strange: int h1=iBarShift(Symbol(),0,t1); int h3=iBarShift(Symbol(),0,t3); int h5=iBarShift(Symbol(),0,t5); int E6=h5-(h1-h3)/2; ObjectCreate("E6",OBJ_VLINE,0,iTime(Symbol(),0,E6),0); t1 t3 t5 are vertical lines, E6 is a line which is 50% bars count of t1 and t3 after reached t5 sometimes E6 will earlier than t5, sometimes not, this make me so confused... is there any error in logic?Ignored
Also annotate the position of T1,T2,T3 etc and where do you expect E6 vertical line will be at.
This is not investment/trading advise. Will not hold accountable for loss