Kase Peak Oscillator – v2

v10.3
Kase Peak Oscillator – v2

The Kase Peak Oscillator technical indicator was developed by Cynthia Kase.

The Kase Peak Oscillator indicator algorithm combines an Average True Range indicator and a Standard Deviation volatility indicator.

The logarithmic models used better reflect the true nature of the market and allow the indicator to automatically adapt to cycle time and volatility.

Second version of this indicator already in the library, but this time converted from a more advanced code translated from MT4 code, by a request in forums.

 

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. Toto le Heros • 07/22/2017 #

    Thanks Nicolas.
    This looks very interresting, despite I am not sure I fully understand it yet. (v23 and v24 not so clear for me. v25 is just to show peaks in pink if I understand well, so it could be valuable in the “allPeaksMode” on to highlight the “unfiltered” peaks (those which don’t appear in the “allPeaksMode” on) in a different color.
    Moreover, would it be possible to code as well the “little brother” : KaseCD. “KCD is the PeakOscillator minus its own average”.
    Many thanks and in advance again Nicolas.

    • Nicolas • 07/22/2017 #

      The KaseCD should also be coded, it is discussed in the Bard’s topic here: https://www.prorealcode.com/topic/kase-peak-oscillator-kase-cd-and-kase-permission/

  2. elanoa • 07/22/2017 #

    Salve sig. Nicolas…sono andato ad inserire l’indicatore nella piattaforma ma mi da Errore nella programmazione…………Errori di sintassi: Definisci la variabile kpolongcycle,kposhortcycle,kposensitivity,kpodeviations e allpeaksmode. Puo’ aiutarmi? Grazie.

    • Nicolas • 07/22/2017 #

      Please download the file or delete all // before these variables names.

  3. AlexF • 07/22/2017 #

    Hi, I can’t understand from the code why the histogram turns violet in certain points…

    • Nicolas • 07/22/2017 #

      Violet histogram is plotted with “kppBuffer” variable. Calculated between lines 51 to 66.

  4. ooples • 07/22/2017 #

    Can anyone explain this code to me?

    Log(Close[0]/Close[1]) Does Close[0] mean the current index and Close[1] means the previous index?

  5. Bard • 07/22/2017 #

    Kase Peak Out using Williams High Volatility Vix Fix Formula: (This finds market tops and bottoms based on Volatility)

    Kase PO William’s Vix Fix:
    (Add PRT Code not Working)

    //PRC_Kase Peak Oscillator V2 | indicator
    //19.07.2017
    //Nicolas @ http://www.prorealcode.com
    //Sharing ProRealTime knowledge
    //translated from MT4 code

    // — settings
    kpoDeviations= 2.0 // Kase peak oscillator deviations
    kpoShortCycle= 8 // Kase peak oscillator short cycle
    kpoLongCycle = 65 // Kase peak oscillator long cycle
    kpoSensitivity = 40
    allPeaksMode = 0 //1=true ; 0=false
    // — end of settings

    pd = 10

    if barindex>kpoLongCycle*2 then
    //ccLog = Log(Close[0]/Close[1])
    wvf = ((highest[pd](close)-low)/(highest[pd](close)))
    ccWVF = wvf
    ccDev = std[9](ccWVF)

    avg = average[30](ccDev)

    if (avg>0) then
    max1 = 0
    maxs = 0

    for k = kpoShortCycle to kpoLongCycle-1 do
    max1 = Max(Log(High[0]/Low[0+k])/Sqrt(k),max1)
    maxs = Max(Log(High[0+k]/Low[0])/Sqrt(k),maxs)
    next
    x1 = max1/avg
    xs = maxs/avg
    endif

    xp= kpoSensitivity*(average[3](x1)-average[3](xs))
    xpAbs = Abs(xp)

    kpoBuffer = xp
    kphBuffer = xp

    tmpVal = average[50](xpAbs)+kpoDeviations*std[50](xpAbs)
    maxVal = Max(90.0,tmpVal)
    minVal = Min(90.0,tmpVal)

    if (kpoBuffer > 0) then
    kpdBuffer = maxVal
    kpmBuffer = minVal
    else
    kpdBuffer = -maxVal
    kpmBuffer = -minVal
    endif
    kppbuffer=0
    if (not allPeaksMode) then
    if (kpoBuffer[1]>0 and kpoBuffer[1]>kpoBuffer[0] and kpoBuffer[1]>=kpoBuffer[2] and kpoBuffer[1]>= maxVal) then
    kppBuffer = kpoBuffer[1]
    endif
    if (kpoBuffer[1]<0 and kpoBuffer[1]<kpoBuffer[0] and kpoBuffer[1]<=kpoBuffer[2] and kpoBuffer[1]0 and kpoBuffer[1]>kpoBuffer[0] and kpoBuffer[1]>=kpoBuffer[2]) then
    kppBuffer = kpoBuffer[1]
    endif
    if (kpoBuffer[1]<0 and kpoBuffer[1]<kpoBuffer[0] and kpoBuffer[1]<=kpoBuffer[2]) then
    kppBuffer = kpoBuffer[1]
    endif
    endif
    endif

    return kphBuffer coloured(105,105,105) style(histogram), kpoBuffer coloured(105,105,105) style(line,2), kpdBuffer coloured(255,0,255), kpmBuffer coloured(0,191,255), kppBuffer coloured(255,0,255) style(histogram,2) as "kpp buffer"

    //105,105,105=grey
    //255,0,255=pink
    //0,191,255=blue

  6. Bard • 07/22/2017 #

    *Correction:

    if barindex>kpoLongCycle*2 then
    //ccLog = Log(Close[0]/Close[1])

    ccWVF = ((highest[pd](close)-low)/(highest[pd](close)))
    ccDev = std[9](ccWVF)

    Better colour scheme with Green Peak Outs to avoid confusion with KPO pink Peak Outs:

    return kphBuffer coloured(105,105,105) style(histogram), kpoBuffer coloured(105,105,105) style(line,2), kpdBuffer coloured(124,252,0), kpmBuffer coloured(0,191,255), kppBufferPO coloured(0,255,0) style(histogram,2) as “kpp buffer”

    //105,105,105=grey
    //255,0,255 =old pink Histogram PO
    //0,191,255 =blue
    //124,252,0 =green line
    //0,255,0 =green Histogram PO

avatar
Register or

Likes

avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar avatar
Related users ' posts
kats Bonsoir, cet indicateur est vraiment très bien avec plusieurs possibilités en coloration . ...
roccafragius Thank you Ivan for your indicators, very very interesting!!!!
kats Bonsoir, Pensez vous pouvoir répondre à ma question posée ci dessus? Ce serait vraiment tr...
kats bONSOIR Est ce normal que les droites se démultiplient en plusieurs droites quelle differe...
kats j ai fait une copie d'ecran mais je ne sais pas comment l'envoyer sur le site
Iván Thanks ;)
kats BONJOUR je lai mis sur du renko , il est complexe car toujours a l'envers??? Peut être ne ...
RTR Great tool again and great job, thank you! So from what I see everytime Z-Score is over 0...
Gaspare Ciao Ivan si puo' inserire una strategia su questo indicatore per ottimizzare le variabil...
P. Marlowe Impressive work. Accurate, interesting, good background. You hit the nail on the head again....
14starwberryhill Such a wonderful work, thanks Ivan..............
Iván Hi! You should change $rbox, $gbox and $bbox variables. Also r,g,b for last box.
finplus Thanks Ivan.
roccafragius Ivan, I just want to say you.. very very great job!!!! Thank you so much for this indicator!...
Iván
3 weeks ago
Iván Si lo descargas e importas en tu PRT verás que se han creado las variables para luego config...
WhyAskOZ Hi, Ivan As always you are doing great coding. The code works on my PRT, however the issu...
Iván You can delete in the last line (return) the configuration for color. Delete coloured(xx,xx,...
Iván
3 weeks ago
Danger Zones Indicator
Danger Zones Indicator
2
Indicators
P. Marlowe Quite an impressive work, as usual. You share extremely useful tools and show an stunning ba...
Iván Thank you very much!
P. Marlowe Quite an impressive work, Iván. Extremely useful and accurate. Congratulations. Keep it up¡
lkiklkik i love it !!! thanks.
Stenozar Hi Ivan, can you translate from tradingviwe the EMA TREND METER INDICATOR? It couid be inte...
Iván Hi Yes I can. Please, create a new topic for that I will translate it.
Stenozar Hi Ivan, I've created a new topic about the indicator: https://www.prorealcode.com/topic/ema...
Iván sería así //------------------Inputs------------------------------ linreglength = 11//i...
Doddge Muchísimas gracias Iván, está genial.
superfalcio holaaa, have you run some statistics?
Doddge Hola Iván, ¿sería posible crear un screener que indique cuándo las velas coloreadas del indi...
RTR Ivan thank you for the pro-screener. I a trying to understand how to write the signals from ...
Iván Hi, Lines 62 and 63. These lines define buy and sell conditions.
el titi Bonjour, merci beaucoup pour ce partage. Je vais regarder avec attention ce script et analys...
Armand2020 Bonjour , super taf!! serait il possible de faire un poc dynamique en timeframe 5 min en mod...
philippe59139 voici ce qu'il faudrait faire ou ajouter: //poc dynamique defparam calculateonlastbars=1...
Iván
2 months ago
Iván I personally like it in daily timeframe
oliTR Many thanks Ivan, I copy/paste your code to try it but could only get a constant stable unif...
Iván Hi, I've copied the code above and it works... what asset are you trying? $indices array ...
francis59 Hello Ivan, thanks for this very nice and powerfull indicator. Could you have time to create...
Iván Hi We could find stocks with sweep on: //PRC_Sweep Institucional //version = 0 //28.0...
inverse Like the way you think Ivan ... :)
Iván Hi You should delete from the indicator code all drawing functions and all variables not us...
Iván I've created a screener to show [longcondition or shortcondition]
Chrisinobi Hallo Ivan, Danke das ist Perfekt !! Kannst du bitte in der Screener-Bibliothek die itf. hoc...
Gio56 Super idée. j'ai juste un souci. j'ai pas de barre verte mais plusieurs lignes de couleurs.....
DeathMetal change line in histgram, (click on indicator name, click on tool (
Gio56 Super merci.

Top