Skip to content
All library documents

EMA, RSI, and Supertrend Signals with ATR Risk Controls

Article Strategy library · Author: ayushlimbani2005

Summary

This Pine strategy combines a fast and slow exponential moving average, Supertrend direction, candle color, and RSI thresholds to generate long and short signals. It requires all four conditions to agree and only enters when no position is open. The script calculates stop distance from ATR, places a stop at one ATR from the entry reference price, and sets a target at twice that distance.

Position size is based on a configurable fraction of strategy equity and the stop distance, then capped by a maximum leverage limit. The script also rounds alert quantities down to whole 0.01 ETH lots and can send JSON alerts. It displays a warning when the chart is not set to 15 minutes. The excerpt ends during the long-entry alert code, so the remaining alert and short-entry handling cannot be assessed. It provides no backtest results or instrument-specific validation; the ETH lot assumption and intrabar calculations may also affect how orders translate to actual execution.

Key ideas

  • Long and short signals combine EMA alignment, Supertrend direction, candle color, and RSI thresholds.
  • ATR sets the stop distance, with a take-profit target twice as far from the entry reference.
  • Position size scales with account equity and stop distance, subject to a leverage cap.
  • Webhook quantities are rounded down to whole 0.01 ETH lots, which can suppress small orders.
  • The excerpt is incomplete and reports no performance evidence.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.