Onchart Kase Peak 2 Colored
Forums › ProRealTime forum Français › Support ProBuilder › Onchart Kase Peak 2 Colored
- This topic has 5 replies, 2 voices, and was last updated 4 years ago by finplus.
Viewing 6 posts - 1 through 6 (of 6 total)
-
-
05/08/2020 at 1:46 PM #130617
Bonjour,
j’ai récupéré ce code sur ce site et j’aimerai uniquement avoir la partie du code qui représente la partie du bas de l’image. Quelqu’un peut il m’aider SVP ? Merci.
OnChart Kase Peak 2 Coloured123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109//PRC_OnChart Kase Peak 2 Coloured | indicator//08.09.2018//Ale @ www.prorealcode.com//Sharing ProRealTime knowledge//WWW.AUTOMATICTRADING.ITDEFPARAM CALCULATEONLASTBARS=1000///////////////////////INDICATOR_KASE PEAK2maPrice = customclose// --- settingskpoDeviations = 2.0 // Kase peak oscillator deviationskpoShortCycle = 8 // Kase peak oscillator short cyclekpoLongCycle = 65 // Kase peak oscillator long cyclekpoSensitivity = 40allPeaksMode = 1 //1=true ; 0=falseAveragePeriod=20AverageMethod=1TightenChannel=5ATRperiod=20// --- end of settingsif barindex>kpoLongCycle*2 thenccLog = Log(Close[0]/Close[1])ccDev = std[9](ccLog)avg = average[30](ccDev)if (avg>0) thenmax1 = 0maxs = 0for k = kpoShortCycle to kpoLongCycle-1 domax1 = Max(Log(High[0]/Low[0+k])/Sqrt(k),max1)maxs = Max(Log(High[0+k]/Low[0])/Sqrt(k),maxs)nextx1 = max1/avgxs = maxs/avgendifxp = kpoSensitivity*(average[3](x1)-average[3](xs))xpAbs = Abs(xp)kpoBuffer = xpkphBuffer = xptmpVal = average[50](xpAbs)+kpoDeviations*std[50](xpAbs)maxVal = Max(90.0,tmpVal)minVal = Min(90.0,tmpVal)if (kpoBuffer > 0) thenkpdBuffer = maxValkpmBuffer = minValelsekpdBuffer = -maxValkpmBuffer = -minValendifkppbuffer=0if (not allPeaksMode) thenif (kpoBuffer[1]>0 and kpoBuffer[1]>kpoBuffer[0] and kpoBuffer[1]>=kpoBuffer[2] and kpoBuffer[1]>= maxVal) thenkppBuffer = kpoBuffer[1]endifif (kpoBuffer[1]<0 and kpoBuffer[1]<kpoBuffer[0] and kpoBuffer[1]<=kpoBuffer[2] and kpoBuffer[1]<=-maxVal) thenkppBuffer = kpoBuffer[1]endifelseif (kpoBuffer[1]>0 and kpoBuffer[1]>kpoBuffer[0] and kpoBuffer[1]>=kpoBuffer[2]) thenkppBuffer = kpoBuffer[1]endifif (kpoBuffer[1]<0 and kpoBuffer[1]<kpoBuffer[0] and kpoBuffer[1]<=kpoBuffer[2]) thenkppBuffer = kpoBuffer[1]endifendifendif///////////////////////////////////////////////////dTR = 0for i = 0to ATRperiod-1dTR=dTR+max(abs(Dhigh(i)-Dlow(i)),max(abs(Dhigh(i)-Dclose(i+1)),abs(Dlow(i)-Dclose(i+1))))nextdtr=dtr/MAX(1,TightenChannel)avgRange = dTRmaValue = average[max(1,AveragePeriod),AverageMethod](maPrice)KPMValue=kpMBufferKPOValue=kpoBufferKPHValue=kphBufferKPDValue=kpdBufferKPPValue=kppBufferBuffer1=maValueBuffer4=maValue+(KPMValue)/100*avgRangebuffer5=maValue+(KPOValue)/100*avgRangebuffer6=maValue+(KPHValue)/100*avgRangebuffer7=maValue+(KPDValue)/100*avgRangebuffer8=maValue+(KPPValue)/100*avgRanger = 50+(100-(KPHBUFFER))*2g = 50+(100+(KPHBUFFER))*2DRAWCANDLE(open, high, low, close)coloured(R,G,50)IF not ViewHistogram thenbuffer6=mavaluebuffer5=mavalueendifDRAWCANDLE(open, high, low, close)coloured(R,G,50)DRAWSEGMENT(barindex, maValue, barindex,buffer6)coloured(0,0,50,50)return Buffer1 coloured(0,0,0) style(line,1) as "0 level", Buffer4 coloured(0,191,255) style(LINE,2) as "KPM",Buffer5 coloured(255,0,255) style(LINE,2) as "KPO",Buffer6 coloured(R,G,50) style(LINE,2) as "KPH",Buffer7 coloured(255,0,255) style(LINE,2) as "KPD",Buffer8 coloured(155,30,255) style(LINE,2) as "KPP"05/11/2020 at 9:17 AM #13106805/11/2020 at 9:58 AM #13108605/11/2020 at 3:39 PM #13115105/11/2020 at 5:06 PM #131166Le code n’étant pas disponible, je l’ai refait pour t’être appréciable 🙂
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071//PRC_Kase Peak Oscillator V2 | indicator//19.07.2017//Nicolas @ www.prorealcode.com//Sharing ProRealTime knowledge//translated from MT4 code// --- settingskpoDeviations = 2.0 // Kase peak oscillator deviationskpoShortCycle = 8 // Kase peak oscillator short cyclekpoLongCycle = 65 // Kase peak oscillator long cyclekpoSensitivity = 40allPeaksMode = 0 //1=true ; 0=false// --- end of settingsif barindex>kpoLongCycle*2 thenccLog = Log(Close[0]/Close[1])ccDev = std[9](ccLog)avg = average[30](ccDev)if (avg>0) thenmax1 = 0maxs = 0for k = kpoShortCycle to kpoLongCycle-1 domax1 = Max(Log(High[0]/Low[0+k])/Sqrt(k),max1)maxs = Max(Log(High[0+k]/Low[0])/Sqrt(k),maxs)nextx1 = max1/avgxs = maxs/avgendifxp = kpoSensitivity*(average[3](x1)-average[3](xs))xpAbs = Abs(xp)kpoBuffer = xpkphBuffer = xptmpVal = average[50](xpAbs)+kpoDeviations*std[50](xpAbs)maxVal = Max(90.0,tmpVal)minVal = Min(90.0,tmpVal)if (kpoBuffer > 0) thenkpdBuffer = maxValkpmBuffer = minValelsekpdBuffer = -maxValkpmBuffer = -minValendifkppbuffer=0if (not allPeaksMode) thenif (kpoBuffer[1]>0 and kpoBuffer[1]>kpoBuffer[0] and kpoBuffer[1]>=kpoBuffer[2] and kpoBuffer[1]>= maxVal) thenkppBuffer = kpoBuffer[1]endifif (kpoBuffer[1]<0 and kpoBuffer[1]<kpoBuffer[0] and kpoBuffer[1]<=kpoBuffer[2] and kpoBuffer[1]<=-maxVal) thenkppBuffer = kpoBuffer[1]endifelseif (kpoBuffer[1]>0 and kpoBuffer[1]>kpoBuffer[0] and kpoBuffer[1]>=kpoBuffer[2]) thenkppBuffer = kpoBuffer[1]endifif (kpoBuffer[1]<0 and kpoBuffer[1]<kpoBuffer[0] and kpoBuffer[1]<=kpoBuffer[2]) thenkppBuffer = kpoBuffer[1]endifendifendifr = 50+(100-(KPHBUFFER))*2g = 50+(100+(KPHBUFFER))*2return kphBuffer coloured(r,g,0) style(histogram), kpoBuffer coloured(r,g,0) style(line,2), kpdBuffer coloured(255,0,255), kpmBuffer coloured(0,191,255), kppBuffer coloured(255,0,255) style(histogram,2)1 user thanked author for this post.
05/11/2020 at 5:50 PM #131180 -
AuthorPosts
Viewing 6 posts - 1 through 6 (of 6 total)
Find exclusive trading pro-tools on
Similar topics: