Deductibility of interest on Primary Residence HELOC when used for purchase of an investment property which will have taxable income

I would like to use the HELOC on my primary residence to purchase an investment property. I will have taxable income in the investment property. I think, under the interest tracing rule, I would be allowed to deduct the HELOC interest on Schedule E for that investment property. Am I correct in my understanding? I will appreciate your comment.