Login Page - Create Account

Support Board


Date/Time: Sun, 22 Dec 2024 05:25:32 +0000



Post From: Klinger volume oscillator

[2015-07-11 22:40:13]
Shane - Posts: 31
Does Sierra Chart have the equivalent of the Klinger Volume Oscillator?

If not, can I get one of you code geniuses to convert the EasyLanguage for me?

regards,
shane

EasyLanguage code follows:

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;

Type: Function Name: KVO
Inputs: FastX(Numeric), SlowX(Numeric); Vars: FXAvg(0), SXAvg(0);
FXAvg = XAverage(VForce, FastX); SXAvg = XAverage(VForce, SlowX); KVO = FXAvg - SXAvg;


Type: Indicator
Name: Klinger Volume Osc
Inputs: FastX(34), SlowX(55), TrigLen(13), Smooth(1); Vars: Trigger(0);
Trigger = XAverage(KVO(FastX, SlowX), TrigLen); IF Smooth <= 1 Then Begin
Plot1(KVO(FastX, SlowX), “KVO”);
Plot2(Trigger, “KVO Trigger”); End Else Begin
Plot1(Summation(KVO(FastX, SlowX), Smooth), “KVO”);
Plot2(Summation(Trigger, Smooth), “KVO Trigger”); End;
Plot3(0, “Zero”);