Here's a Pine Script for TradingView that provides buy and sell signals using the EMA (Exponential Moving Average) and SMA (Simple Moving Average). It also calculates targets for a 1:2 risk-reward ratio. You can modify the parameters such as EMA length, SMA length, and stop-loss distance to suit your strategy.
Ema Sma Signal
Answer in chat instead This script calculates buy and sell signals based on the crossover of the EMA and SMA. When a crossover occurs, it displays the entry price, stop-loss, and take-profit levels on the chart with labels.
Key Features: Inputs for EMA/SMA Lengths: Easily configurable EMA and SMA lengths. Dynamic Stop-Loss and Take-Profit: Automatically calculates levels based on the input risk-reward ratio. Visual Signals: Labels and background highlights for buy/sell signals.