2 Pole Oscillator by Big Beluga

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #243406 quote
    adeelq79
    Participant
    Junior

    Good evening all,

    Please can you help to convert this indicator on Trading View – https://www.tradingview.com/script/2Ssn4yDZ-Two-Pole-Oscillator-BigBeluga/

     

    Many thanks.

    #243407 quote
    LucasBest
    Participant
    Average

    Good evening,
    Have you tried it ?
    If not, here what you can expect…

    Capture-decran-2025-02-03-205645.jpg Capture-decran-2025-02-03-205645.jpg
    #243410 quote
    adeelq79
    Participant
    Junior

    Thanks, yes I have tried it and I think it works well identifying oversold or overbought areas.

    #243679 quote
    Iván González
    Moderator
    Master

    Hi. here it is:

     

    //---------------------------------------------//
    //PRC_Two Pole oscillator
    //version = 0
    //10.02.2025
    //Iván González @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //---------------------------------------------//
    // inputs
    //---------------------------------------------//
    length=20 // filter length
    dispLevels= 1 // display levels?
    prd=25 // moving average periods
    //---------------------------------------------//
    // source calculation
    //---------------------------------------------//
    sma1=average[prd](close)
    smaN1=((close-sma1)-average[prd](close-sma1))/std[prd](close-sma1)
    area=average[100](high-low)
    //---------------------------------------------//
    // Oscillator
    //---------------------------------------------//
    source=smaN1
     
    alpha=2/(length+1)
     
    if barindex<max(prd*2,length) then
    smooth1=source
    smooth2=smooth1
    else
    smooth1=(1-alpha)*smooth1+alpha*source
    smooth2=(1-alpha)*smooth2+alpha*smooth1
    endif
    
    twoP=smooth2
    twoPP=twoP[4]
    //---------------------------------------------//
    // Colors
    //---------------------------------------------//
    if twoP>twoPP then
    r=85
    g=255
    b=218
    else
    r=140
    g=91
    b=255
    endif
    //---------------------------------------------//
    // Signals
    //---------------------------------------------//
    buySignal=twoP crosses over twoPP and twoP<0
    sellSignal=twoP crosses under twoPP and twoP>0
    
    if buysignal then
    drawpoint(barindex[1],twoP[1],2)coloured(r,g,b)
    drawpoint(barindex[1],twoP[1],5)coloured(r,g,b,100)
    elsif sellSignal then
    drawpoint(barindex[1],twoP[1],2)coloured(r,g,b)
    drawpoint(barindex[1],twoP[1],5)coloured(r,g,b,100)
    endif
    //---------------------------------------------//
    return twoP coloured(r,g,b)style(line,2), 1 coloured("grey",100), 0.5 coloured("grey",100), 0 coloured("black")style(dottedline3), -1 coloured("grey",100), -0.5 coloured("grey",100)
    Msport71 thanked this post
    #243710 quote
    adeelq79
    Participant
    Junior

    Thanks Ivan. Thats great.

    Patrick K Templar thanked this post
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

2 Pole Oscillator by Big Beluga


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
adeelq79 @adeelq79 Participant
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by adeelq79
1 year ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 02/03/2025
Status: Active
Attachments: 1 files
Logo Logo
Loading...