I am trying to develop a pair balancing algo that uses market signals such as BB, MACD, and RSI to adjust the weights of two etfs using order_target_percent(symbol('symbol'), ??%).
Does anyone know how to have a dynamic order_target_percent? I want to increase the weight by 1% if it is within BB, has positive MACD, and an RSI below 70. It would also decrease the weight of the pair etf by the same amount.
Any help would be greatly appreciated!