Klinger Oscillator conversion

Forums ProRealTime English forum ProBuilder support Klinger Oscillator conversion

Viewing 6 posts - 1 through 6 (of 6 total)
  • #243195

    Is it possible to convert this Thinkscript code to Prorealcode.

    input MALength = 13;

    def DM = high – low;
    def Trend = if hlc3 > hlc3[1] then 1 else -1;
    def CM = DM + if Trend == Trend[1] then CM[1] else DM[1];
    def VForce = if CM != 0 then Trend * 100 * volume * AbsValue(2 * DM / CM – 1) else VForce[1];
    plot KVOsc = ExpAverage(VForce, 34) – ExpAverage(VForce, 55);
    plot TriggerLine = Average(KVOsc, MALength);
    plot ZeroLine = 0;Klin

    #243201

    No se si estará bien, pero creo que es de la siguiente forma:

    I don’t know if it’s correct, but I think it’s like this:

    MALength = 13
    DM = high – low
    hlc3= (high + low + close)/3
    if(hlc3>hlc3[1]) THEN
    Trend = 1
    ELSE
    Trend = -1
    ENDIF
    CM = DM
    if Trend = Trend[1] then
    CM = CM[1] + DM
    else
    CM = DM[1]
    endif

    if CM <> 0 then
    VForce = Trend * 100 * volume * Abs(2 * DM / CM – 1)
    else
    VForce = VForce[1]
    endif
    KVOsc = ExponentialAverage[34](VForce) – ExponentialAverage[55](VForce)
    TriggerLine = Average[MALength](KVOsc)
    return KVOsc as “Klinger” ,TriggerLine as “Signal”

    #243203

    @cjr30

    Only post in the language of the forum that you are posting in. For example English only in the English speaking forums and French only in the French speaking forums

    Thanks 🙂

     

    #243206
    JS

    Here is the modified version:

    1 user thanked author for this post.
    #243208

    Thanks for your try cjr30.

    If I compare both codes with same timeframe there is huge difference (yes it could be data).

    Can someone else give it a try?

    #243218

    Hi, I've coded it too, I hadn't seen the JS code and I have the same result as him.

    1 user thanked author for this post.
Viewing 6 posts - 1 through 6 (of 6 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login