/*[[ Name := TripleScreenWkEx Author := Barcode Link := Lots := 1.00 Stop Loss := 30 Take Profit := 100 Trailing Stop := 0 ]]*/ Defines: StopYear(1990); var: MacdCurrent(0), MacdPrevious(0), MacdPrevious2(0) ,Direction(""), PosNeg(""); Var: newbar(0),PrevDay(0),PrevMonth(0),PrevYear(0),PrevCurtime(0); var: Handle1(0), First(true),FileName(""); If year < stopyear then exit; If first Then Begin first = False; Filename="TripleScreenWky"+Symbol+".csv"; Handle1 = FileOpen(FileName, ","); End; If newbar != t[0] Then { // print(day,"/",month,"/",year); newbar = t[0]; MacdCurrent = iMACD(12,26,9,MODE_MAIN,0); MacdPrevious = iMACD(12,26,9,MODE_MAIN,1); MacdPrevious2 = iMACD(12,26,9,MODE_MAIN,2); If MacdPrevious > MacdPrevious2 then Direction = "U"; If MacdPrevious < MacdPrevious2 then Direction = "D"; If MacdPrevious = MacdPrevious2 then Direction = "F"; // If MacdCurrent > MacdPrevious then Direction = "U"; // If MacdCurrent < MacdPrevious then Direction = "D"; // If MacdCurrent = MacdPrevious then Direction = "F"; If MacdPrevious > 0 then PosNeg = "Pos"; If MacdPrevious < 0 then PosNeg = "Neg"; If MacdPrevious = 0 then PosNeg = "Zro"; PrevDay = Day; PrevMonth = Month; PrevYear = Year; PrevCurTime = CurTime; FileWrite(Handle1,PrevDay,PrevMonth,PrevYear,PrevCurtime,Direction,PosNeg); };