OPEN-SOURCE SCRIPT

MA 50 + MA 200 / Owl of Profit

MA 50 + MA 200 Strategy

This simple strategy leverages the crossover of two moving averages — the 50-period and 200-period Simple Moving Averages (SMA) — to identify trend reversals and generate buy and sell signals.

Features:
Moving Average Calculation:

MA 50: Represents the short-term trend.
MA 200: Represents the long-term trend.
Crossover Logic:

Bullish Crossover: When MA 50 crosses above MA 200, indicating a potential upward trend.
Bearish Crossover: When MA 50 crosses below MA 200, indicating a potential downward trend.
Entry and Exit Logic:
Long Condition:

Triggered when MA 50 crosses above MA 200.
Closes any short position before opening (or adding to) a long position.
Short Condition:

Triggered when MA 50 crosses below MA 200.
Closes any long position before opening (or adding to) a short position.
Visualization:
MA 50 (Short-Term): Plotted on the chart as a dynamic line for short-term trend analysis.
MA 200 (Long-Term): Plotted on the chart to reflect the long-term trend.
Crossover points are visually indicated by the trade entry/exit markers on the chart.
This strategy is ideal for traders who prefer a simple and effective trend-following approach based on moving averages. Use it for backtesting and adaptation to your trading style.

Visit my website for more tools and strategies: bybitindicators.com

Happy trading!

Aviso legal