OPEN-SOURCE SCRIPT

Custom SMA Crossover Strategy with Text Signals

125
Custom SMA Crossover Strategy with Text Signals
This indicator combines three simple moving averages (9, 21, and 100 periods) to generate trading signals with clear visual feedback:

Core Logic

Buy Signal: When price is above 100 SMA + 9 SMA crosses above 21 SMA

Sell Signal: When price is below 100 SMA + 9 SMA crosses below 21 SMA

Visual Features

Colored 100 SMA (green=price above, red=price below)

Gradient fill between 9/21 SMAs (green=uptrend, red=downtrend)

Clear "BUY"/"SELL" labels with directional arrows

Background highlighting on signal bars

Practical Benefits

Prevents consecutive signals until opposite condition occurs

Automatic label cleanup (max 50 visible signals)

Ready-to-use price alerts for automation

Clean chart integration with adjustable SMA lengths

Usage
Identifies trend-confirmed entries:

100 SMA acts as trend filter

9/21 SMA crossover provides entry timing

Ideal for swing trading and trend following strategies

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.