Strategy · Pine Script v4 · On the chart

Rapid Fire

by hasnocool· code credited to atakhadivi

This strategy draws on the price chart and enters long when the open crosses above the Parabolic SAR and is above a 50-period simple moving average of close.

View on GitHub

Repaints

GitHub stars106on the repository
Pine versionv4older, still runs
Lines of code15
Settings0inputs
LicenceGPL-3.0
Last update2 years ago18 Sep 2024

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

Source Code

15 lines of Pine Script v4 from BTC Rapid fire strategy 1M Scalping.pine, published under GPL-3.0. Keep the author's credit and licence lines when you reuse it.

BTC Rapid fire strategy 1M Scalping.pine
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © atakhadivi
//@version=4
strategy("rapid fire", overlay=true)
longCondition = open > sar(0.02,0.02,0.2) and open[1] < sar(0.02,0.02,0.2)[1] and open > sma(close,50)
takeprofit = strategy.position_avg_price * (1 + 0.005)
stopLoss = strategy.position_avg_price * (1 - 0.015)
if (longCondition)
    strategy.entry("longEntry", strategy.long, limit = takeprofit, stop = stopLoss)
shortCondition = open < sar(0.02,0.02,0.2) and open[1] > sar(0.02,0.02,0.2)[1] and open < sma(close,50)
take_profit = strategy.position_avg_price * (1 - 0.005)
stop_Loss = strategy.position_avg_price * (1 + 0.015)
if (shortCondition)
    strategy.entry("shortEntry", strategy.short, limit = take_profit, stop = stop_Loss)
Expand (18 lines)

Overview

Rapid Fire enters short on the opposite cross below that average. Offset prices of 0.5 percent and 1.5 percent from the average entry are passed as the entry order limit and stop, not as separate exit orders, so no dedicated stop-loss exit is defined. There are no user inputs. The SAR can change on the live bar.

Details

Published by

hasnocool on GitHub

Code credit

atakhadivi, as written in the script's header

Type

Strategy, Pine Script v4

Draws

On the price chart

Category

Trend, Moving averages, Scalping

Markets

Crypto

Timeframes

M1-M5

Risk Notes

  • Signals can change on the live bar or after it closes (repainting)
  • The strategy enters trades without a stop loss

Topics

analysisbtcusdtcryptocurrencydatapandaspythonsimulationtradingtradingview

Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

257 stars

This overlay strategy marks short-term turning points on the price chart and enters SPY option-style trades from them. It plots simple moving averages of highs and lows, draws up and down reversal arrows, and colors bars when a short-term extreme coincides wit

Strategy v5 TrendMoving averages Repaints
Updated 6 weeks ago · None stated GitHub repository of SPY Options Trading - Alert
53 stars

This strategy trades EUR/USD on the price chart using a fast and slow exponential moving average crossover filtered by RSI. It enters long when the fast EMA crosses above the slow EMA while RSI is above 50 and below the overbought level, and enters short on th

Strategy v6 TrendMoving averages
Updated 2 months ago · MPL-2.0 GitHub repository of EUR/USD EMA9-21 + RSI Scalping Strategy
13 stars

This strategy plots on the price chart and enters from a moving-average filter, ADX and Gann colours. Price above a 200-period EMA allows only longs; price below allows only shorts. A Gann aqua colour with ADX above a key level opens a long, and a Gann brown c

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Ruckard TradingZone ADX Gann

Scalping 3EMA

by rodrigo-brito
9 stars

This long-only strategy calculates three exponential moving averages with lengths of 50, 100, and 150 periods, plotting them directly on the price chart. It also calculates a 14-period RSI and MACD. The strategy opens long positions when the moving averages al

Strategy v4 TrendOscillators & momentum
Updated 5 years ago · MIT GitHub repository of Scalping 3EMA

Doge SMA

by hackingthemarkets
474 stars

Doge SMA is a long-only moving-average crossover strategy drawn on the price chart. It calculates a fast and a slow simple moving average of close and enters a long position when the fast average crosses above the slow average, but only inside a user-defined s

Strategy v4 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of Doge SMA

More strategys

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers