OPEN-SOURCE SCRIPT
Granny Strategy [rdjxyz]

This is the Granny Strategy, as described on TG Capital's Sunday Service stream.
Definitions
The Setup
*As described on the stream.
*Look for longs when price is above 50 EMA; look for shorts when price is below the 50 EMA.
Inputs
Exception Inputs
Allow some exceptions to the rigid rules
Play around with the different settings on various timeframes and instruments to find rules that work best for your strategy goals. Or just use it to find valid vs. invalid setups historically.
Will be working on adding a trailing stop loss.
Leave a comment with any bugs or ideas you have to improve the strategy.
IMPORTANT
Adjust account size, position size, commissions, etc in the properties tab for accurate results!
Definitions
- C0 - Candle 0 - the candle where the FVG start is plotted
- C1 - Candle 1 - the candle that drives the FVG
- C2 - Candle 2 - the candle where the FVG end is plotted
- C3 - Candle 3 - the entry candle (assuming all criteria are met)
- 👵🏻 - Valid setup
- 🤡 - Invalid setup
The Setup
*As described on the stream.
*Look for longs when price is above 50 EMA; look for shorts when price is below the 50 EMA.
- FVG is printed
- C2 sweeps the low of C1 and closes bullish (for longs) or sweeps the high of C1 and closes bearish (for shorts)
- C3 inverts FVG and closes below C1 open (for longs) or above C1 open (for shorts)
- If criteria above is met, position is entered on the close of C3 with stop loss at the low of C3 (for longs) or high of C3 (for shorts)
Inputs
- Time Window Filter - only look for setups within a certain range of time
- EMA length - original strategy calls for 50
- Stop loss offset - ticks to offset stop loss from low (for longs) / high (for shorts) of C3
- Risk:Reward ratio - take profit as a multiple of the stop loss size from entry
- Break even stop loss - optional, move stop loss to break even after price reaches a specific R:R; e.g. once price hits 1:1 R:R, move stop loss to break even
Exception Inputs
Allow some exceptions to the rigid rules
- Select which candle in the sequence the EMA filter is applied to (can produce different results)
- Disable EMA bias filter (will find shorts when price is above EMA and longs when price is below)
- Allow C3 to close inside of FVG (instead of completely inverting it)
- Allow C3 to close above C1 open (for longs) or below C1 open (for shorts)
- Allow C2 to close opposite of setup direction; e.g. if long, C2 is allowed to close as a bearish candle instead of bullish candle
Play around with the different settings on various timeframes and instruments to find rules that work best for your strategy goals. Or just use it to find valid vs. invalid setups historically.
Will be working on adding a trailing stop loss.
Leave a comment with any bugs or ideas you have to improve the strategy.
IMPORTANT
Adjust account size, position size, commissions, etc in the properties tab for accurate results!
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.