Strategy · Pine Script v5 · On the chart

Grail Only Shorts

by Wendigooor

A short-only strategy that combines a slow SMA, medium and fast EMAs, a pin bar test, a stochastic filter, an MFI filter on a separate timeframe and a stochastic momentum index.

View on GitHub

Repaints

GitHub stars1on the repository
Pine versionv5runs as is
Lines of code186
Settings29inputs
LicenceNone stated
Last update2 years ago6 Apr 2024

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  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

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

Exits use a trailing stop plus a hard stop expressed in pips. Inputs include stop distances, indicator periods, filter levels, optional entry and zone drawings, and Pineconnector alert fields for MT4 or MT5. It runs on every tick, so signals can change on the live bar.

Details

Published by

Wendigooor on GitHub

Type

Strategy, Pine Script v5

Draws

On the price chart

Category

Trend, Candlestick patterns

Markets

Forex

Timeframes

M1-M5

Risk Notes

  • Signals can change on the live bar or after it closes (repainting)

Settings

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

SettingTypeDefaultVariable
Stop Loss Trail Points (Pips)int140slPoints
Stop Loss Trail Offset (Pips)int1slOffset
Hard Stop Loss (Pips)int100slHardPoints
Slow SMA (Period)int120sma_slow
Medm EMA (Period)int77ema_medm
Fast EMA (Period)int9ema_fast
Pinbar confirmation valuefloat0.15pinbarConfirmationValue
Use Stochastic as Filter (OB/OS)?booltruseStochasticAsFilter
Length for Main Stochasticint14len
SmoothK for Main Stochasticint3smoothK
SmoothD for Main Stochasticint3smoothD
Upper Line Value? (shorts - above line)int30upLine
Show all 29 settings
SettingTypeDefaultVariable
Lower Line Value? (longs - below line)int50lowLine
Use Current Chart Resolution?booltrueuseCurrentRes
Use Different Timeframe? Uncheck Box Abovetimeframe1resCustom
Use Different Timeframe MFI? Uncheck Box Abovetimeframe5resCustomMFI
Use MFI as 2nd Filter? (current timeframe)booltrueuseMFI
Lengthint8mfiLength
OverSold (longs - below line)int20mfiOversold
OverBought (shorts - above line)int45mfiOverbought
Percent K Lengthint10smi_k
Percent D Lengthint3smi_d
Overboughtint20smi_ob
Oversoldint20smi_os
Pineconnector License IDstring12345pineconnectorLicenseID
Symbol for close alert (MT4/MT5)stringEURUSD.ipineconnectorInputSymbol
Volume (lots size)float0.4pineconnectorVolume
Draw possible entries?boolfalseplot_entries
Draw good zones for short?boolfalseplot_short_zones
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

Pin Bar Magic v1

by Alorse
330 stars

This strategy trades price action pin bar patterns aligned with moving average trend alignment on the main price chart. It defines uptrends or downtrends using a fan arrangement of three moving averages (6 EMA, 18 EMA, and 50 SMA). Entry conditions require a b

Strategy v4 Candlestick patternsTrend
Updated 2 months ago · None stated GitHub repository of Pin Bar Magic v1
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

ESU2023-10M - V1

by dearvn
257 stars

ESU2023-10M - V1 is an intraday trend-reversal strategy designed for index futures contracts on the price chart. It calculates a 3-period moving average of candle highs and lows alongside specific three-bar price action patterns to detect short-term swing high

Strategy v5 TrendCandlestick patterns
Updated 6 weeks ago · None stated GitHub repository of ESU2023-10M - V1
106 stars

This strategy trades the three-candle strike pattern filtered by trend direction and time sessions. It calculates market regime using linear regression and exponential or smoothed moving averages to distinguish between ranging and trending conditions. Risk man

Strategy v5 Candlestick patternsTrend
Updated 2 years ago · GPL-3.0 GitHub repository of 3 Candle Strike Strategy

Consecutive Up/Down Strategy

by TWODS-CAPITAL
37 stars

This strategy tracks consecutive bullish and bearish candlestick closes relative to the preceding bar. It enters a long position when price closes higher for a specified number of consecutive bars, and enters a short position when price closes lower for a desi

Strategy v5 Candlestick patternsTrend
Updated 3 years ago · MIT GitHub repository of Consecutive Up/Down Strategy

DI Engulfing A002

by ruckard
13 stars

This strategy executes trades based on candlestick engulfing patterns aligned with a 200-period exponential moving average trend filter. It enters long positions when a bullish engulfing candle follows three consecutive bearish candles while price trades above

Strategy v5 Candlestick patternsTrend
Updated 1 year ago · None stated GitHub repository of DI Engulfing A002

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