/*[[ Name := TDSGlobal Author := Copyright © 2005 Bob O'Brien / Barcode Link := Notes := Based on Alexander Elder's Triple Screen system. Lots := 0 Stop Loss := 0 Take Profit := 0 Trailing Stop := 0 ]]*/ var: MacdCurrent(0), MacdPrevious(0), MacdPrevious2(0) ,Direction(0), PosNeg(""),ASC1(0); Var: newbar(0),PrevDay(0),PrevMonth(0),PrevYear(0),PrevCurtime(0),GlobalName(""); If newbar != t[0] Then { newbar = t[0]; ASC1=icustom("ASCTrend1",MODE_FIRST,1); Direction = 0; If ASC1=l[1] then { Direction=1; }; If ASC1=h[1] then { Direction=-1; }; GlobalName = "Gb1_Wk_"+Symbol+"_Direction"; SetGlobalVariable(GlobalName, Direction); Comment("ASCGlobal = ",Direction); };