PureBytes Links
Trading Reference Links
|
Hello Jdev02,
I often find TS4 gives wrong calculations using data2, and TRAD has
never supplied much info on how code is best structured.
When you get different results you have to check to see if either is
the correct calculation.
One thing I see is you have a complex calculation in the buy
statement, nOpen + (Range * .40)
Best to do the calculating in a variable and keep the buy statement
simple.
best regards
foolsgold
Jac> Can anyone tell me why switching between the bond variable and the close of
Jac> data2 code yields slightly different results? When I run an optimization
Jac> report on the lines of code there are minor differences in the net profit and
Jac> I'm picking up an additional trade here and there with the data 2 code. Some
Jac> Portions of the test are identical.
Jac> Thanks,
Jac> John
Jac> Vars: Bonds(0);
Jac> Bonds = close of Data2;
Jac> if Bonds < Bonds[15]
Jac> {{{ and close of data2 < close[15] of data2 }}}
Jac> then buy at nOpen + (Range * .40) stop;
|