Back

Build a custom TradingView indicator in Pine Script

A working Pine Script indicator on your TradingView chart, with code and backtest results

AnalystsEngineering
Prompt

Build a custom TradingView indicator in Pine Script from this spec: [what it should do, e.g. mark bullish engulfing candles above the 50 EMA when RSI is under 40]. Reference: [optional links or screenshots]. Use the latest Pine Script version and make every length, threshold, and color an input. Open TradingView on a [asset, e.g. BTCUSDT] chart at [timeframe, e.g. 15 minutes], paste the script into the Pine Editor, and add it to the chart. If it fails to compile, fix the error and retry until it runs clean. Check that signals appear where the spec says on recent bars. If I asked for a backtest, convert it to a strategy and read the Strategy Tester results. Save it as a new private script named [script name]. Don't publish, overwrite existing scripts, connect a broker, or place orders. Send me the code, a note on each input, and a backtest table: net profit, win rate, profit factor, max drawdown, trades.

Works withtradingview.com