MarketMode MultiPeriods HeatMap
Forums › ProRealTime English forum › ProBuilder support › MarketMode MultiPeriods HeatMap
- This topic has 0 replies, 1 voice, and was last updated 4 years ago by Hasardeur.
Viewing 1 post (of 1 total)
-
-
01/17/2020 at 4:29 PM #117091Market Mode swami123456789101112131415161718192021REM --------------------------REM PRC_multiperiods HeatMap indicatorREM --------------------------startperiod= 8 // start period of the loopmaxPeriod= 48 // end period of the loopStep= 4 // period step of the loopPeriod= startperiod //first period to test is startperiodwhile Period <= maxPeriod domean, fractionUp, fractionDn = CALL "MarketMode"[Period]PosH= mean/(fractionUp-0)PosL= mean/(0-fractionDn)Ro = max(0, (50-PosH*150))Ge = max(0, (50+PosL*150))drawtext("■",barindex,Period,dialog,bold,18) coloured(min(ro,255),min(ge,255),0)Period= max(startperiod, Period+Step) //increase indicator period for next loop iterationwendreturn mean style(line,3) as "MarketMode", fractionUp coloured(100,100,100) as "upper line", fractionDn coloured(100,100,100) as "lower line", 8, 48Market Mode by John Ehlers12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879REM --------------------------REM Market Mode indicatorREM --------------------------Variable: Period 20IF barindex >= Period THENREM ----------------------REM BANDPASS FILTER, Code 5.1 from Cycle Analytics for Traders by John F.Ehlers 2013REM ----------------------REM High Pass FilterHPPrice= MedianPriceHPPeriod= Period // 20HPBandwidth= 0.5 // 0.10-0.50alphaHP= (COS(0.25*HPBandwidth*360/HPPeriod) + SIN(0.25*HPBandwidth*360/HPPeriod)-1) / COS(0.25*HPBandwidth*360/HPPeriod)HP= (1+alphaHP/2) * (HPPrice-HPPrice[1]) + (1-alphaHP)*HP[1]REM BandPass FilterBPPrice= HPBPPeriod= HPPeriod // 20BPBandwidth= HPBandwidth // 0.10-0.50beta= COS(360/BPPeriod)gamma= 1/COS(360*BPBandwidth/BPPeriod) // 2013 => 360, 2008 =>720alphaBP= gamma - SQRT(gamma*gamma-1)BP= 0.5*(1-alphaBP)*(BPPrice-BPPrice[2]) + beta*(1+alphaBP)*BP[1] - alphaBP*BP[2]REM --------------------------REM Market ModeREM --------------------------mean= BPdPeriod= Period * 2 // (40)FOR k= 1 to dPeriod-1 DOmean= mean + BP[k]inc= kNEXTmean= mean/incLevelUpDownAveragePeriod= MAX(8, Period /2) // (10)alphaUpDown= 2 /(1+LevelUpDownAveragePeriod)workapeak= workapeak[1]IF mean > 0 THENworkapeak= workapeak[1] + alphaUpDown*(mean-workapeak[1])ENDIFworkavaley= workavaley[1]IF mean < 0 THENworkavaley= workavaley[1] + alphaUpDown*(mean-workavaley[1])ENDIFREM Colour of the BP LineFraction = 0.8fractionUp= Fraction*workapeakfractionDn= Fraction*workavaleyIF mean > fractionUp THENr= 50g= 205b= 50ELSIF mean < fractionDn THENr= 255g= 50b= 50ELSEr= 205g= 205b= 0ENDIFREM Colour of the BP HistogrammiPeriod1= 0PosH= mean/(fractionUp-0)PosL= mean/(0-fractionDn)Ro = max(0, (50-PosH*150))Ge = max(0, (50+PosL*150))drawtext("■",barindex,iperiod1,dialog,bold,18) coloured(min(ro,255),min(ge,255),0)ENDIFendifreturn mean coloured(r,g,b) style(line,3) as "MarketMode", fractionUp coloured(100,100,100) as "fractionUp", fractionDn coloured(100,100,100) as "fractionDn"
Hallo all,
the attached picture is showing the market mode
- Market mode heat map Period of 8 to 48
- Market mode at fix period of 20
- Market mode Bandpass Filter
By comparing the fix period (20) to the heat map at line of period 20 you will see a difference.
What is this difference caused by?
Do you have any idea to fix it?
Many thanks for your reply in advanced.
Best regards
Hasardeur
-
AuthorPosts
Viewing 1 post (of 1 total)
Find exclusive trading pro-tools on
Similar topics: