On the net (on a lot of Web sites) there is the following code to compute it:
Code: Select all
Type: Function, Name: VForce
Vars: TSum(0), Trend(0), DM(0), CM(0);
TSum = High + Low + Close;
IF TSum > TSum[1] Then
Trend = 1
Else
Trend = -1;
IF Trend = Trend[1] Then
CM = CM + Range
Else
CM = Range + Range[1];
IF CM <> 0 Then
VForce = Volume * AbsValue(2 * (DM/CM) -1) * Trend * 100;
It looks like there is a problem...
DM = 0... so AbsValue(2 * (DM/CM) -1) will always be equal to -1...
Is it normal? Did I miss something?
BTW what is DM? Would be cool to have the right formula!