The seasonality curve built by Vonasi is not working anymore https://www.prorealcode.com/prorealtime-indicators/seasonality-curve/
on some instruments it only plots one or two months and on most of them notihing..
it worked fine a couple of months ago and all of a sudden it stoped working.
my only guess is that a command or something used in the code has changed from prorealtime in a update?
is anyone able to spot the error?
//Seasonality Curve
//By Vonasi
//Date: 20200326
defparam drawonlastbaronly = true
//StartDate = 19950101 //Set to zero to analyse all of history
//EndDate = 20200101 //Set to zero to analyse all of history
//HighAndLow = 1 //switch on and off drawing of high and low points
//Percentage = 1 //switch on or off calcualtion based on percentage of price
if enddate <= 0 or enddate < startdate then
enddate = 99999999
endif
if barindex > 0 and opendate >= startdate and opendate <= enddate then
if percentage then
diff = (((close - close[1])/close[1])*100)
else
diff = close - close[1]
endif
mydate = date - (floor(date/10000)*10000)
$total[mydate] = $total[mydate] + diff
endif
if islastbarupdate then
if barindex > 365 then
mymonth = 100
myday = 1
thisdate = mymonth + myday
lastsegment = 0
drawtext("Jan",barindex - 365,0,SansSerif,Bold,12)coloured(0,0,255)
a = 365
for b = 1 to 365
mybar = barindex - a
if isset($total[thisdate]) then
drawsegment(mybar,lastsegment,mybar+1,lastsegment + $total[thisdate])
lastsegment = lastsegment + $total[thisdate]
a = a - 1
endif
if myday = 31 then
mymonth = mymonth + 100
myday = 0
if mymonth = 200 then
drawtext("Feb",mybar,lastsegment - $total[thisdate],SansSerif,Bold,12)coloured(0,0,255)
endif
if mymonth = 300 then
drawtext("Mar",mybar,lastsegment - $total[thisdate],SansSerif,Bold,12)coloured(0,0,255)
endif
if mymonth = 400 then
drawtext("Apr",mybar,lastsegment - $total[thisdate],SansSerif,Bold,12)coloured(0,0,255)
endif
if mymonth = 500 then
drawtext("May",mybar,lastsegment - $total[thisdate],SansSerif,Bold,12)coloured(0,0,255)
endif
if mymonth = 600 then
drawtext("Jun",mybar,lastsegment - $total[thisdate],SansSerif,Bold,12)coloured(0,0,255)
endif
if mymonth = 700 then
drawtext("Jul",mybar,lastsegment - $total[thisdate],SansSerif,Bold,12)coloured(0,0,255)
endif
if mymonth = 800 then
drawtext("Aug",mybar,lastsegment - $total[thisdate],SansSerif,Bold,12)coloured(0,0,255)
endif
if mymonth = 900 then
drawtext("Sep",mybar,lastsegment - $total[thisdate],SansSerif,Bold,12)coloured(0,0,255)
endif
if mymonth = 1000 then
drawtext("Oct",mybar,lastsegment - $total[thisdate],SansSerif,Bold,12)coloured(0,0,255)
endif
if mymonth = 1100 then
drawtext("Nov",mybar,lastsegment - $total[thisdate],SansSerif,Bold,12)coloured(0,0,255)
endif
if mymonth = 1200 then
drawtext("Dec",mybar,lastsegment - $total[thisdate],SansSerif,Bold,12)coloured(0,0,255)
endif
endif
myday = myday + 1
thisdate = mymonth + myday
mymax = max(lastsegment,mymax)
once mymin = lastsegment
once mymax = lastsegment
mymin = min(lastsegment,mymin)
if mymax = lastsegment then
maxval = lastsegment
maxbar = mybar
endif
if mymin = lastsegment then
minval = lastsegment
minbar = mybar
endif
next
if HighAndLow then
drawpoint(maxbar+1,maxval,3)coloured(128,0,0)
drawpoint(minbar+1,minval,3)coloured(0,128,0)
endif
endif
endif
return mymax coloured(0,0,0,0), mymin coloured(0,0,0,0)