//PRC_RSI multiperiods HeatMap | indicator
//Plot an heatmap of the RSI range of periods
//28.06.2019
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
// --- settings
startperiod=20 //start period of the loop
maxscale=500 //end period of the loop
Step=10 //period step of the loop
// --- end of settings
iPeriod=startperiod //first period to test is..startperiod
while iPeriod<=maxscale do
// --- indicator calculation
osc = rsi[iperiod]
// -----
result=osc
R = max(0,50+(200-(result-50)*12))
G = max(0,50+(200+(result-50)*12))
drawtext("■",barindex,iperiod,dialog,bold,18) coloured(min(r,255),min(g,255),0)
iPeriod=max(startperiod,iPeriod+Step) //increase indicator period for next loop iteration
wend
return startperiod,maxscale