jurik smoothed kijun sen

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #150809 quote
    Patrick K TemplarPatrick K Templar
    Participant
    Average

    jurik smoothed kijun sen

    Hello and thank you for Conversion

    It is what it says it is a kijun sen with Jurick moving average applied to it i’ve got an mq4 file with something very similar to it so I will link that

    (This is a jurik smoothed kijun sen  if you want a regular kijun sen just set the smooth length to 1.)

    Thank you very much and kind regards

    Patrick

    jurik.png jurik.png Jurik_Kijun_Bands.mq4
    #150824 quote
    Patrick K TemplarPatrick K Templar
    Participant
    Average

    the mq4 file of the jurik kijuns bands is wrong  dont use that i belive you did a jurik macd So I believe the coding wouldn’t be too far different from that for what I would like I can’t seem to find a mq4 file of the code yet there might be a tradingview

    #150826 quote
    Patrick K TemplarPatrick K Templar
    Participant
    Average

    this is jurik ma file in mq4  it shold help with the codeing

    jurik-moving-average.mq4
    #151563 quote
    Patrick K TemplarPatrick K Templar
    Participant
    Average

    iv got the code for both just need help add them together

    #151564 quote
    Patrick K TemplarPatrick K Templar
    Participant
    Average
    Series = CustomClose
    
    //----------------------------//
    // JMA - Jurik Moving Average //
    //----------------------------//
    
    IF MAType = 1 THEN
    
    Period = MAX(Period, b)
    
    // Pow = 5 ({ 1..10 })
    // R = 1.5 ({0.5..2.5})
    Pow = 4
    R = 1
    
    beta = 0.45 * (Period - 1) / (0.45 * (Period - 1) + 2)
    
    IF Pow = 1 THEN
    alpha = beta
    ELSIF Pow = 2 THEN
    alpha = beta * beta
    ELSIF Pow = 3 THEN
    alpha = beta * beta * beta
    ELSIF Pow = 4 THEN
    alpha = beta * beta * beta * beta
    ELSIF Pow = 5 THEN
    alpha = beta * beta * beta * beta * beta
    ELSIF Pow = 6 THEN
    alpha = beta * beta * beta * beta * beta * beta
    ELSIF Pow = 7 THEN
    alpha = beta * beta * beta * beta * beta * beta * beta
    ELSIF Pow = 8 THEN
    alpha = beta * beta * beta * beta * beta * beta * beta * beta
    ELSIF Pow = 9 THEN
    alpha = beta * beta * beta * beta * beta * beta * beta * beta * beta
    ELSIF Pow = 10 THEN
    alpha = beta * beta * beta * beta * beta * beta * beta * beta * beta * beta
    ENDIF
    
    IF BarIndex = 0 THEN
    Filt0 = Series
    Filt1 = Series
    AFR = Series
    ELSE
    Filt0 = (1 - alpha) * Series + alpha * Filt0[1]
    Det0 = (Series - Filt0[0]) * (1 - beta) + beta * Det0[1]
    Filt1 = Filt0[0] + R * Det0[0]
    Det1 = (Filt1[0] - AFR[1]) * ((1 - alpha) * (1 - alpha)) + (alpha * alpha) * Det1[1]
    AFR = AFR[1] + Det1[0]
    ENDIF
    
    ENDIF
    
    // RETURN //
    
    RETURN AFR as  "AFRjmc"
    Kijunsen  = (highest[a](high)+lowest[b](low))/2
    
    
    RETURN Kijunsen
    #151579 quote
    NicolasNicolas
    Keymaster
    Legend

    Here is the code of the KijunSen smooth with a Jurik Filter:

    p2 = 26 //period of Kijun
    Period = 5 //period of smoothing
    
    if barindex>p2+Period then 
    Series = (highest[p2](high)+lowest[p2](low))/2
    
    //----------------------------//
    // JMA - Jurik Moving Average //
    //----------------------------//
    
    
    
    //Period = MAX(Period, b)
    
    // Pow = 5 ({ 1..10 })
    // R = 1.5 ({0.5..2.5})
    Pow = 4
    R = 1
    
    beta = 0.45 * (Period - 1) / (0.45 * (Period - 1) + 2)
    
    IF Pow = 1 THEN
    alpha = beta
    ELSIF Pow = 2 THEN
    alpha = beta * beta
    ELSIF Pow = 3 THEN
    alpha = beta * beta * beta
    ELSIF Pow = 4 THEN
    alpha = beta * beta * beta * beta
    ELSIF Pow = 5 THEN
    alpha = beta * beta * beta * beta * beta
    ELSIF Pow = 6 THEN
    alpha = beta * beta * beta * beta * beta * beta
    ELSIF Pow = 7 THEN
    alpha = beta * beta * beta * beta * beta * beta * beta
    ELSIF Pow = 8 THEN
    alpha = beta * beta * beta * beta * beta * beta * beta * beta
    ELSIF Pow = 9 THEN
    alpha = beta * beta * beta * beta * beta * beta * beta * beta * beta
    ELSIF Pow = 10 THEN
    alpha = beta * beta * beta * beta * beta * beta * beta * beta * beta * beta
    ENDIF
    
    IF BarIndex = 0 THEN
    Filt0 = Series
    Filt1 = Series
    AFR = Series
    ELSE
    Filt0 = (1 - alpha) * Series + alpha * Filt0[1]
    Det0 = (Series - Filt0[0]) * (1 - beta) + beta * Det0[1]
    Filt1 = Filt0[0] + R * Det0[0]
    Det1 = (Filt1[0] - AFR[1]) * ((1 - alpha) * (1 - alpha)) + (alpha * alpha) * Det1[1]
    AFR = AFR[1] + Det1[0]
    ENDIF
    endif 
    
    
    // RETURN //
    
    RETURN AFR as  "AFRjmc"
    Patrick K Templar thanked this post
    kijun-smoothed-jurik-filter.png kijun-smoothed-jurik-filter.png
    #151586 quote
    Patrick K TemplarPatrick K Templar
    Participant
    Average

    Thank you very much appreciate a lot

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

jurik smoothed kijun sen


ProBuilder: Indicators & Custom Tools

New Reply
Summary

This topic contains 6 replies,
has 2 voices, and was last updated by Patrick K TemplarPatrick K Templar
5 years, 9 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 11/17/2020
Status: Active
Attachments: 4 files
ProRealCode ProRealCode
Loading...