O'Reilly logo
  • Paul Bartruff thinks this is interesting:

sum = sum + (dataSeries1[value1] − dataSeries2[value1]);

From

Cover of Building Winning Trading Systems with TradeStation®, + Website, 2nd Edition

Note

{
Code does not seem to work with constant error at the minus sign. It really wants a semicolon so I broke the code down like the following:
}
...
Vars:
index(0),
ans(0),
ds1(0),
ds2(0);

For index = 0 to 20
Begin
ds1 = dataSeries1[index];
ds2 = dataSeries2[index];
ans = ds1 - ds2;
End;

SumDiff = ans;