PureBytes Links
Trading Reference Links
|
Try this, hard-charger:
Input: length(13),XAVlen(3);
Var: DMIMin(1);
DMIMin = DMIMinus(Length);
If DMIMin = 0 then DMIMin = .001;
Plot1(XAverage(DMIPlus(LENGTH)/DMIMin,XAVlen),"Plot1");
Plot2(0, "Zero");
IF CheckAlert Then Begin
IF Plot1 Crosses Above Plot2 or Plot1 Crosses Below Plot2 Then Alert =
TRUE;
End;
----- Original Message -----
From: preston morrow <prestonm@xxxxxxxxxxx>
To: List Omega <omega-list@xxxxxxxxxx>
Sent: Saturday, July 17, 1999 7:24 PM
Subject: dividing by zero
> 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;
>
>
|