Here’s what I’m looking for:
- **For Long Trades**: Exit the position when the moving average changes from green (bullish) to red (bearish).
- **For Short Trades**: Exit the position when the moving average changes from red (bearish) to green (bullish).
I’m using a colored moving average to visually represent the market trend. I would like the strategy to automatically close the trade once the color indicates a trend reversal. I assume I’ll need to reference the moving average’s color property within the strategy code to trigger the exit, but I’m not sure how to do this efficiently.
Could someone assist me in implementing this logic or point me to relevant resources that would help integrate this exit condition into my existing strategy?
Thank you!

Comment