Hi, having issues with integrating a N Day Sma Filter to a Long/Short TrailStop strategy. I have the trails calculated somewhat (via min/max) problem is i want to only take Long trail signals if price > 200dma and only short trail signals when < 200dma. Also the price cross below or above N day sma should override any trail stop thats active at that moment. I think i have the if and else conditions wrongly structured, could someone please look it over.
Thanks for your time