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
lolo
10 years ago
Directional Volume
Directional Volume
1
Indicators
Rory Dryden Initial viewing of this on SPY shows promise.
lolo
10 years ago
KST
KST
1
Indicators
Alai-n Bonjour. Que cela soit cette formulation du KST ou celle par défaut de la plateforme PRT, au...
lolo
10 years ago
SafeZone Stop - Elder
SafeZone Stop – Elder
0
Indicators
lolo
10 years ago
Hull moving average
Hull moving average
8
Indicators
Hynesjp Hi Nicolas, I followed your suggestion to be able to change the colour but I cannot get the ...
Nicolas Remove the COLOURED instruction from the last line of the code.
Jozo Hi Guys, could you help? When I attach this Hull MA it goes to subwindow! It should attach o...
lolo
10 years ago
Swing Hilo
Swing Hilo
0
Indicators
lolo
10 years ago
Projection Oscillator
Projection Oscillator
0
Indicators
lolo
10 years ago
Projection Bands
Projection Bands
0
Indicators
lolo
10 years ago
Hammer
Hammer
0
Indicators
lolo
10 years ago
Thermometer
Thermometer
0
Indicators
lolo
10 years ago
%B Bollinger
%B Bollinger
7
Indicators
Laurent Thanks a lot
oraclus Bonjour le %bollinger est protégé sur Prorealtime. Le code ci-dessus est paramétré par défau...
Nicolas Le code dans ce post répond à cette demande d'adaptation de la période du %Bollinger: https:...
lolo
10 years ago
Trend Force
Trend Force
3
Indicators
Petrus Hi Lolo.   If you put on the graph only the difference between both values, the resul...
swapping Trend Force with Background Color
swapping // --- property setting //Alpha = 40 // Transparency backgroundcolor // --- end // Dete...
lolo
10 years ago
TD REI
TD REI
0
Indicators
lolo
10 years ago
ZIGZAG TREND
ZIGZAG TREND
4
Indicators
Vonasi I'm interested in this indicator but it does not appear to work on 10.3. Could it be possibl...
Nicolas You need to change the 'amnt' variable to a percentage, so if you set it to 10 it represents...
Vonasi Thanks for your reply - I had tried that - I set the amnt to 1 on a 15 min GBPUSD chart and ...
lolo
10 years ago
Demarker
Demarker
0
Indicators
lolo
10 years ago
Schaff Trend Cycle
Schaff Trend Cycle
3
Indicators
Fabio Anthony Terrenzio what are the two orizzontal line?
ggolfet The results I get from this indicator seem different from the results obtained using the ind...
Nicolas An accurate indicator (identical to the platform one) for Schaff Trend Cycle is now also ava...
lolo
10 years ago
lolo
10 years ago
lolo
10 years ago
BuilderRVI
BuilderRVI
0
Indicators
Nicolas
10 years ago
Guibourse HI, I wonder how to change the mid line color depending on its growing or declining evolutio...
Brent38 Bonjour à tous, Post tardif, mais on débute tous un jour, et moi je découvre Prorealcode. ...
Nicolas Oui en effet, le TDI c'est un RSI lissé avec des écarts types sur sa moyenne.
Nicolas
10 years ago
Tradesun Salve, ho provato ad inserire l'indicatore nella piattaforma ma mi chiede di definire la var...
maximus78 Tradesun, se scarichi il file ITF allegato e lo importi nella piattaforma ci sono già le var...

Top