OPEN-SOURCE SCRIPT

Flexible Moving Average Strategy

Theo oanstein
Cập nhật
This strategy offers flexibility to choose between SMA and EMA, and allows users to set the review frequency to Daily, Weekly, or Monthly. It adapts to different market conditions by providing full control over the length and timeframe of the Moving Average.

### Key Features:
- **Moving Average Method**: Select between SMA and EMA.
- **Review Frequency**: Choose Daily, Weekly, or Monthly review periods.
- **Customizable**: Set the Moving Average length and timeframe.
- **Entry/Exit Rules**:
- **Enter Long**: When the close price is above the Moving Average at the end of the period.
- **Exit**: When the close price falls below the Moving Average.

### Parameters:
- **Review Frequency**: Daily, Weekly, Monthly
- **Moving Average Method**: SMA or EMA
- **Length & Timeframe**: Fully adjustable

This strategy suits traders who prefer a flexible, trend-following approach based on long-term price movements.
Phát hành các Ghi chú
Added more types of Moving Averages
Phát hành các Ghi chú
Added input to specify the percentage of the portfolio to sell when MA is crossed below
Exponential Moving Average (EMA)Moving AveragesSimple Moving Average (SMA)

Mã nguồn mở

Theo tinh thần TradingView thực sự, tác giả của tập lệnh này đã xuất bản dưới dạng nguồn mở để các nhà giao dịch có thể hiểu và xác minh. Chúc mừng tác giả! Bạn có thể sử dụng miễn phí. Tuy nhiên, bạn cần sử dụng lại mã này theo Quy tắc nội bộ. Bạn có thể yêu thích nó để sử dụng nó trên biểu đồ.

Bạn muốn sử dụng tập lệnh này trên biểu đồ?

Thông báo miễn trừ trách nhiệm