Stoch RSI Heat Map
- This topic has 4 replies, 3 voices, and was last updated 6 years 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 › Stoch RSI Heat Map
Hi All,
I have this little code for a Stochastic RSI Indicator built up on an exponentialmoving average of xx length:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
A=exponentialaverage[xx](close) AH=exponentialaverage[xx](high) AL=exponentialaverage[xx](low) RSI14 = RSI[14](A) MinRSI = lowest[14](RSI[14](AH)) MaxRSI = highest[14](RSI[14](AL)) StochRSI = (RSI14-MinRSI) / (MaxRSI-MinRSI) IF StochRSI < 0 THEN StochRSI = 0 ENDIF IF StochRSI > 1 THEN StochRSI = 1 ENDIF return StochRSI as "Stoch RSI 3", 0.2, 0.8 |
I would like to build up an “heat map chart” similar to that reported here: https://www.prorealcode.com/prorealtime-indicators/rsi-multiperiods-heatmap/ in which the values of my “Stochastic RSI Indicator” are represented in function of the xx length value of the exponential moving average.
Can anyone help me with this idea?
Thanks a lot
Loop
I don’t know how you will interpret it, but 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 |
//PRC_STOCH RSI multiperiods HeatMap | indicator //https://www.prorealcode.com/topic/stoch-rsi-heat-map/ //Plot an heatmap of the RSI range of periods //Nicolas @ www.prorealcode.com //Sharing ProRealTime knowledge // --- settings startperiod=14 //start period of the loop maxscale=200 //end period of the loop Step=7 //period step of the loop // --- end of settings iPeriod=startperiod //first period to test is..startperiod while iPeriod<=maxscale do // --- indicator calculation A=exponentialaverage[iperiod](close) AH=exponentialaverage[iperiod](high) AL=exponentialaverage[iperiod](low) RSI14 = RSI[14](A) MinRSI = lowest[14](RSI[14](AH)) MaxRSI = highest[14](RSI[14](AL)) StochRSI = (RSI14-MinRSI) / (MaxRSI-MinRSI)*100 // ----- result=stochRSI R = max(0,50+(200-(result-50)*12)) G = max(0,50+(200+(result-50)*12)) drawtext("■",barindex,iperiod,dialog,bold,18) coloured(min(max(10,r),255),min(max(10,g),255),0) iPeriod=max(startperiod,iPeriod+Step) //increase indicator period for next loop iteration wend return startperiod,maxscale |
Find exclusive trading pro-tools on 