2 Pole Oscillator by Big Beluga
- This topic has 4 replies, 3 voices, and was last updated 6 months ago by .
Viewing 5 posts - 1 through 5 (of 5 total)
Viewing 5 posts - 1 through 5 (of 5 total)
Similar topics:
Forums › ProRealTime English forum › ProBuilder support › 2 Pole Oscillator by Big Beluga
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.
Hi. here it is:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
//---------------------------------------------// //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) |
Thanks Ivan. Thats great.
Find exclusive trading pro-tools on