Pine Script Writer
Pine v5 is the pinned syntax target. Build a long condition and an optional short condition using a fast SMA or EMA crossing above or below a slow SMA or EMA; RSI crossing above, crossing below, above or below a selected level; the MACD line crossing above or below its signal line; or closing price above or below an SMA or EMA. Moving average and MACD crossovers require the fast length to be shorter than the slow length.
This generates source from selections only and does not translate arbitrary prose. No TradingView account is needed to generate. Paste the source into TradingView's Pine Editor; compiling and applying the script in TradingView itself is your step.
Supported rule shapes
- Moving average crossover: a fast SMA or EMA crosses above or below a slow SMA or EMA.
- RSI level: RSI crosses above, crosses below, is above, or is below a selected level.
- MACD crossover: the MACD line crosses above or below its signal line.
- Price vs moving average: closing price is above or below an SMA or EMA.
Pine v5 only. This generates source from selections only; arbitrary prose is not translated. Generation needs no TradingView account. Paste the output into TradingView's Pine Editor and compile and apply it there yourself.