How to calculate supertrend for renko charts of 1 min timeframe in c#?

What is the code or formula to calculate the supertrend for renko charts? I calculated the renko chart values from ticks but now want to calculate the supertrend value for each candle