TradingView
PtGambler
15 feb 2022 06:45

3 Candle Strike Stretegy 

SPDR S&P 500 ETF TRUSTArca

Beskrivning

Mainly developed for AMEX:SPY trading on 1 min chart. But feel free to try on other tickers.

Basic idea of this strategy is to look for 3 candle reversal pattern within trending market structure. The 3 candle reversal pattern consist of 3 consecutive bullish or bearish candles,
followed by an engulfing candle in the opposite direction. This pattern usually signals a reversal of short term trend. This strategy also uses multiple moving averages to filter long or short
entries. ie. if the 21 smoothed moving average is above the 50, only look for long (bullish) entries, and vise versa. There is option change these moving average periods to suit your needs.
I also choose to use Linear Regression to determine whether the market is ranging or trending. It seems the 3 candle pattern is more successful under trending market. Hence I use it as a filter.

There is also an option to combine this strategy with moving average crossovers. The idea is to look for 3 candle pattern right after a fast moving average crosses over a slow moving average.
By default , 21 and 50 smoothed moving averages are used. This gives additional entry opportunities and also provides better results.

This strategy aims for 1:3 risk to reward ratio. Stop losses are calculated using the closest low or high values for long or short entries, respectively, with an offset using a percentage of
the daily ATR value. This allows some price fluctuation without being stopped out prematurely. Price target is calculated by multiplying the difference between the entry price and the stop loss
by a factor of 3. When price target is reach, this strategy will set stop loss at the price target and wait for exit condition to maximize potential profit.

This strategy will exit an order if an opposing 3 candle pattern is detected, this could happen before stop loss or price target is reached, and may also happen after price target is reached.

*Note that this strategy is designed for same day SPY option scalping. I haven't determined an easy way to calculate the # of contracts to represent the equivalent option values. Plus the option
prices varies greatly depending on which strike and expiry that may suits your trading style. Therefore, please be mindful of the net profit shown. By default, each entry is approximately equal
to buying 10 of same day or 1 day expiry call or puts at strike $1 - $2 OTM. This strategy will close all open trades at 3:45pm EST on Mon, Wed, and Fri.

**Note that this strategy also takes into account of extended market data.

***Note pyramiding is set to 2 by default, so it allows for multiple entries on the way towards price target.

Remember that market conditions are always changing. This strategy was only able to be back-tested using 1 month of data. This strategy may not work the next month. Please keep that in mind.

Also, I take no credit for any of the indicators used as part of this strategy.

Enjoy~

Versionsinformation

Fixed bugs:
  • SL and PT displayed on entry signal was incorrect. SL/PT replaced by red and green lines on chart with filled area.
  • "No long entry at 10am" option wasn't working properly. Fixed.
  • Open trades weren't exiting at SL properly. Fixed. Trade will no longer exit on opposite candle pattern.

Versionsinformation

Updated with leverage parameters for back testing. It no longer estimates P/L for trading SPY options.
Added alerts for all 3 Candle Strike signals, can be accessed by selecting "alert() function calls" when adding Alerts
Added options to display moving average lines.
Added take profit options (price target hit / trailing after price target hit)
Added session control for entries. Strategy will close all trades outside of trade entry session
* note that this strategy is no longer optimized for trading SPY 1 min timeframe. It can be used in all markets and assets.
Kommentarer
rdpeacock67
I'm a total noob, how do i use this signal in 3Commas?
adisa72
Hi, this indicator is almost exactly wht I was looking for So thank you very much for putting it together.
I noticed that the Bear/Bull strike signals don't always come afer more than 3 consequtive coloured candles!

Is there a way to adjust the settings to make it fire a signal on a new colour candle after 3 or more consecutive inverse candles ?

Thanks again
PtGambler
@adisa72, can you reach me through my channels and show me some examples where signals might have missed?
PtGambler
Check out the new and improved version of this strategy with better yield~
tradingview.com/script/jwrO5Gbl-3-Candle-Strike-SPY-Option-Strategy/
nickollie1
So far so good. Noticing that the alerts error out ("Stopped - Calculation error"); any thoughts?
PtGambler
@nickollie1, sorry~ I am still an amateur with pine script. If anyone knows how to fix that, please let me know.
joshuaridings
Thanks looks promising
Mer