zero divide problem

 
i'm trying to create a chart for a pair that doesn't exist (of course in the company i'm working with), so i took the "period_converter" indicator & made some modification (file attached)

i got in the expert tab zero divide & doesn't working what can be the problem

thanks for your help

 
Your code is trying to divide by zero, add print statements everywhere you have a division and print the denominator . . .
 
Whenever I really must use the / sign and not for comments, i usually go out of my way within the code to ask first. Something like if the denominator ==0 then return.
 
i dont know y, but work just fine in M30 & higher TF but not in M1
 
Maybe you don't have the required M1 data, have you checked on a chart ?
 
sure, same cart i didn't changed the pair (anyway it's doesn't matter i'm using iOpen()...)
 
So what value do you get when you use iOpen to get the value of a bar that isn't in your history ?