This should give you a basic Idea.
Names Default to here(1);
dt = new table("Test", add rows(10),
New Column("AB", formula(if(random uniform()<=.8, 1, -1))),
New Column("BC", formula(if(random uniform()<=.8, 1, -1))),
New Column("CD", formula(if(random uniform()<=.8, 1, -1))),
New Column("DE", formula(if(random uniform()<=.8, 1, -1))),
New Column("EF", formula(if(random uniform()<=.8, 1, -1))),
);
cols = dt << Get Column Reference(dt << Get Column Names);
dt << new Column("VS", formula(nrows(Loc(Evallist({:AB, :BC, :CD, :DE, :EF}), -1))));
dt << New Column("PD", formula(Contains(Evallist({:AB, :BC, :CD, :DE, :EF}), -1)));