About this template
This bot aims to profit from the retracing of a fair value gap (FVG) or market imbalance. I haven't seen a bot here on OA yet that uses this strategy so I thought I'd give it a shot :)
Note: This bot is for demonstration purposes only. I don't have any data on it yet, but I wanted to share its automations and the trading concept with the community.
WHAT IS A FAIR VALUE GAP (FVG)?
An FVG occurs when there's an imbalance between buyers and sellers in the market. When looking at a candlestick chart, these FVGs can be identified as follows:
- 3 candlesticks make up the pattern (can be bullish or bearish)
- The middle, 2nd, candle is large
- The 1st candle's wick does not overlap the 3rd candle's wick
- The distance between the 1st and 3rd candle's wicks is the FVG (see bullish example below)
WHY IS THE FVG IMPORTANT?
Due to the market imbalance, many times these FVGs will be "filled," much like an overnight gap is filled. While there is not a 100% chance of price retracing into the FVG, there is a high likelihood it will as the market will seek to correct the imbalance.
HOW DOES THE FVG BOT WORK?
This bot will seek to open a long ATM position once the 3rd candle of the FVG is about to close (3:45 pm EST of the 3rd candle). The first input should be the size of the FVG. The default is a 0.5% gap. Next, the bot will check for a 3 candle pattern where they are all in the same direction (color). Then at 3:45 pm EST:
For a bearish trade:
- The bot will ensure the distance between the intraday low (the lower wick of the 3rd candle) and the high of the 1st candle is larger than the user-defined FVG
- The bot will enter a 45 DTE, 50 delta, long put in anticipation of the FVG retracement
For a bullish trade:
- The bot will ensure the distance between the intraday high (the upper wick of the 3rd candle) and the low of the 1st candle is larger than the user-defined FVG
- The bot will enter a 45 DTE, 50 delta, long call in anticipation of the FVG retracement
SOME CONSIDERATIONS
- I'm not entirely sure about the exit strategy, but it is currently set to close at:
- 100% profit
- 10% trailing stop activated at 25% profit
- 15 days before expiration
- I set the trades to open 45 DTE as the FVG retracement can take some time.
- There is a symbol loop in this bot (SPY and QQQ) so the FVG value would need to be adjusted if other tickers are introduced, or the bot could be cloned for use with other tickers.
- This bot should be PDT safe as no trades are entered until the end of the day