FTX:BTCPERP   Bitcoin Perpetual Futures
Hi, I am attempting to make a filter to be added to strategy that lets you know when the MFI it is in a downtrend or an uptrend, I think the code is 90% there but I am struggling on the last bit.
I would like to have a user defined lookback that you can set and it works the average between them. then you use the current MTF MFI rading to decide if it it is lower than the average to decipher the MTF MFI trend. lookback. for example -/6 > MTF . Thanks for any assistance I will republish the script when finalized

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.