/*[[ Name := Robot Power Global Author := Copyright © 2005 Bob O'Brien / Barcode Link := Notes := Lots := 0 Stop Loss := 0 Take Profit := 0 Trailing Stop := 0 ]]*/ var: ITB(0), ITS(0) ,Direction(0), PosNeg(""); Var: newbar(0),GlobalName(""); If newbar != t[0] Then { newbar = t[0]; ITB=icustom("itrend",0,0,0,20,2,14,mode_first,0); ITS=icustom("itrend",0,0,0,20,2,14,mode_second,0); If ITB > 0 then Direction = 1; If ITS < 0 then Direction = -1; If ITB = 0 and ITS = 0 then Direction = 0; If ITB > 0 then PosNeg = "Pos"; If ITS < 0 then PosNeg = "Neg"; If ITB = 0 and ITS = 0 then PosNeg = "Zro"; GlobalName = "Gb1_Wk_"+Symbol+"_Direction"; SetGlobalVariable(GlobalName, Direction); Comment("Global Direction = ",Direction); };