PureBytes Links
Trading Reference Links
|
i am attempting to create an occilator consisting of a moving average of
dmi+ / dmi-. i have attempted several ways to account for a divisor of
zero, including the exact verbiage of the TS 4.0 error message.
following is my current version, but it occasionally still gives me the
dreaded error message that says i cannot divide by zero! (which i know,
but my programming skillss are too elementary. thanx, preston
Input: length(13),XAVlen(3),zero(0);
Plot1(IFF(DMIMinus(LENGTH) <> 0, (XAverage(DMIPlus(LENGTH) /
DMIMinus(LENGTH),XAVlen)),1),"Plot1");
Plot2(zero,"Plot2");
IF CheckAlert Then Begin
IF Plot1 Crosses Above Plot2 or Plot1 Crosses Below Plot2
Then Alert = TRUE;
End;
|