the Timeframe on your chart (named the DEFAULT Timeframe) MUST be <= to the lowest one used in your code
ALL greater Timeframes used in your code MUST be multiple of the default TF
If you use a 4-hour TF and a 30-minute TF, you can set the default TF (the one on your chart) to 1, 2, 3, 5, 6, 10, 15, 30 minutes, but NOT 4, 7, 20 minutes since both 4h (which is 240 minutes) and 30 minutes are NOT multiple of 4!