Strategy · Pine Script v5 · On the chart

Scalp Agiota - By H7

by leocairos

The Scalp Agiota strategy calculates RSI and MFI values to identify overbought and oversold conditions for cryptocurrency scalping trades.

View on GitHub

Repaints

GitHub stars3on the repository
Pine versionv5runs as is
Lines of code77
Settings4inputs
LicenceMIT
Last update2 years ago11 Mar 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

77 lines of Pine Script v5 from anotherFiles/old/tradingview/scalpAgiotaH7.ps, published under MIT. Keep the author's credit and licence lines when you reuse it.

scalpAgiotaH7.ps
// © leocairos 2022.09.25

//SCALP do Agiota - By Henrique Sete
//https://www.youtube.com/watch?v=QWO0JSDoQ2M&t=1247s

// Scalp operations that last for minutes to make money fast.
// The basis of the strategy is the exhaustion of a strong movement (very stretched upwards,
// or too stretched down), based on some indicators
// and analysis to define the entry point.

//   * 5% bankroll maximum
//   * Graphic time 15 min and 1HR
//   * Target from 1% to 2%
//   * Many opportunities arise at dawn
//   * Isolated mode
//   * 20x to 50x leverage
//   *Stop loss 2%

//   * How to find assets for setup
//     * Highly valued or greatly undervalued currencies
//     * Robot 7ZORD

//   * Indicators:
//     * RSI (Relative Strength Index) - Upper Ban = 80 ; Lower Ban = 20
//     * MFI (Cash Flow Index) - Standard
//     * EMA 9 - Watch the price move away from the average, every time the price moves too far from the average and hits the RSI AND MFI the setup tends to work out

//   * Strategy
//     - The asset MUST be in an uptrend/downtrend the strategy will not work on sideways assets
//     - Follow the majority trend of BTC (bullish or bearish).

//     - Short: RSI in the region of 80 and MFI in the region of 90. If it is in the resistance region it is even better.
//     - Long: RSI in the region of 20 and MFI in the region of 10. If you are in the SUPPORT region it is even better.

//     - 3 items to cancel an operation
//       * Power candle
//       * high volume
//       * BTC in the opposite direction

//@version=5
strategy(title="Scalp Agiota - By H7", shorttitle="Scalp Agiota - By H7", overlay=true, default_qty_type = strategy.cash, default_qty_value=10, initial_capital=100, currency=currency.USD, commission_type = "percent", commission_value = 0.75, max_bars_back = 200)

// EMA 9
ema9 = ta.ema(close, 9)

// RSI
rsiLengthInput = input.int(14, minval=1, title="RSI Length", group="RSI Settings")
rsiSourceInput = input.source(close, "Source", group="RSI Settings")
up = ta.rma(math.max(ta.change(rsiSourceInput), 0), rsiLengthInput)
down = ta.rma(-math.min(ta.change(rsiSourceInput), 0), rsiLengthInput)
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))
//rsiUpperBand = hline(70, "RSI Upper Band", color=color.new(#787B86, 50))
//rsiLowerBand = hline(30, "RSI Lower Band", color=color.new(#787B86, 50))
//plot(rsi, "RSI", color=#F57C00, linewidth=2)

//MFI
mfiLengthInput = input.int(title="Length", defval=14, minval=1, maxval=2000, group="MFI Settings")
mfiSourceInput = input.source(hlc3, "Source", group="MFI Settings")
mfi = ta.mfi(mfiSourceInput, mfiLengthInput)
//mfiUpperBand=hline(80, title="MFI Upper Band", color=color.new(#787B86, 50))
//mfiLowerBand=hline(20, title="MFI Lower Band", color=color.new(#787B86, 50))
//hline(50, "Middle Band", color=color.new(#787B86, 25))
//plot(mfi, "MFI", color=#0496FF, linewidth=2 )


long = (rsi <= 20 and mfi <=10)
plotshape(long, style=shape.triangleup, location=location.belowbar, size=size.tiny, color=color.lime, text='h7')

short = (rsi >= 80 and mfi >=90)
plotshape(short, style=shape.triangledown, location=location.abovebar, size=size.tiny, color=color.red, text='h7')

lote = 1
strategy.entry("long", strategy.long, lote, when =  long)
strategy.entry("short", strategy.short, lote, when =  short)

strategy.close("long", when = short)
strategy.close("short", when = long)

Overview

Scalp Agiota - By H7 plots upward triangles on the price chart below the bar when RSI drops to 20 or lower and MFI to 10 or lower, signaling long entries. Downward triangles appear above the bar for short signals when RSI exceeds 80 and MFI exceeds 90. The strategy uses a fixed quantity of 10 units per trade in cash mode and automatically closes the opposing position upon signal reversal. Primary settings modify the RSI length, MFI length, and their respective data sources. It overlays directly on the price chart without additional panes. It has no stop loss configured by default.

Details

Published by

leocairos on GitHub

Type

Strategy, Pine Script v5

Draws

On the price chart

Category

Oscillators & momentum, Scalping, Mean reversion

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

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
RSI Lengthint14rsiLengthInput
SourcesourceclosersiSourceInput
Lengthint14mfiLengthInput
Sourcesourcehlc3mfiSourceInput
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

7 stars

This strategy plots RSI on the price chart and enters a long when RSI falls below the oversold level or a short when it rises above the overbought level, only while flat. It exits with a take profit and stop loss measured in pips from the current close. Inputs

Strategy v6 Oscillators & momentumScalping
Updated 3 months ago · None stated GitHub repository of XAUUSD 1-Minute Scalping Strategy

Mean Reversion

by nxtaiapp
2 stars

This strategy executes mean-reversion trades using Bollinger Bands combined with a fast RSI oscillator and MACD confirmation. It enters long or short positions when price reaches band extremes during oversold or overbought RSI levels, with optional MACD trend

Strategy v5 Mean reversionScalping
Updated 11 months ago · MIT GitHub repository of Mean Reversion

RSI/BB 1minute Study

by SammyEnigma
18 stars

This strategy combines Relative Strength Index and Bollinger Bands for short-term signal generation. It enters long positions when the price crosses below the lower Bollinger Band while the RSI falls at or below the oversold threshold. Positions are scaled dow

Strategy v4 Oscillators & momentumVolatility & bands
Updated 6 years ago · None stated GitHub repository of RSI/BB 1minute Study
330 stars

Alert BB + RSI [Alorse] is a multi-symbol mean-reversion strategy designed for cryptocurrency trading. It evaluates Bollinger Bands and the Relative Strength Index (RSI) across up to 20 user-defined ticker symbols simultaneously. The strategy enters long posit

Strategy v4 Oscillators & momentumVolatility & bands
Updated 2 months ago · None stated GitHub repository of Alert BB + RSI [Alorse]
285 stars

Mean Reversion Strategy is an overlay strategy that identifies pullbacks using a long-term EMA, RSI, and candlestick patterns. It generates long signals when a bullish engulfing candle forms below the EMA while RSI is oversold, and short signals when a bearish

Strategy v4 Mean reversionCandlestick patterns
Updated 3 years ago · None stated GitHub repository of Mean Reversion Strategy

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