Outside Bar FinderOutside bars occur when the range of a candlestick falls entirely outside of the previous candlestick's range. This indicates indecision and volatility expansion which often leads to changes in trend direction.
This indicator includes options such as:
- The number of consecutive outside bars required to trigger the indicator
- An arrow indicating whether the outside bar is bullish or bearish
- Signal lines to indicate the high and low of the outside bar
Try out this indicator with different options on different timeframes to see if outside bars increase the probability of identifying changes in trend. Breaks or closes outside the signal lines can be used to trigger trade signals.
Candlestickpattern
Lower time frame Intrabar CandlesI was looking for an indicator to show me what a lower time frame is doing at the start, middle, and end of the candle, but I couldn't find one, hench,
I made my own using Tradingview latest capabilities to fetch a lower time frame from a higher time frame chart.
For example, if your chart is 1 hour and this indicator is set to a lower time frame of 15 minutes, then the Start, Middle, or End (Select which in settings) of the 15min candle will be displayed overlaying the 1-hour candle.
This will always show you what the lower time frame candle is currently doing without the need to open an additional lower time frame chart. How cool is that?
Remember to select a lower time frame in the settings than the chart time frame for it to work as expected.
Enjoy :)
-=== Notes ===-
* The lower time frame candles BORDER is set to WHITE by default, however, you can adjust the color of the candle (wicks, body, and border) of the 'LTF Candle' indicator inside its Settings -> Style
* Suitable for candles and designed to work in historical and real time.
* Added optional label to show lower time frame values (can be disabled via indicator settings).
* You can adjust the visuals of the chart candles at Chart Settings -> Symbol -> Body, Borders, or Wicks to visually see better the lower time frame candles.
There is also a similar concept volume-based using histogram, stay tuned.
Like if you like and follow: www.tradingview.com
Fake breakHi Traders,
I've developed an indicator which can detect fake-breaks on the chart.
In the following you'll find the definition of the fake break candles and also you will find how to recognize it on the chart with practical examples.
What is the fake break pattern?
Sometimes support and resistance lines broke with a full body and strong candles that gives us the idea of sharp movements on the chart but suddenly the next candle returns all the path of the previous candle. in this case we can say fake break is happening on the chart.
This indicator detect fake break patterns based on two criteria:
1. It uses AverageTrueRange indicator to measure the strength of the pattern.
2. The returning candle should engulf minimum 75% of the break candle.
This indicator plot 2 terms in the name of "FB-D" and "FB-U" that are abbreviations of the "Fake Break Down" and "Fake Break Up".
You can also set alerts to get notified when fake breakout happens on the chart.
Notice: This pattern is only acceptable in valid support and resistance zones and you can not rely on it everywhere on the chart (specially in the middle of the waves).
Notice: The source code of this indicator is open and you are allowed to use it on your scripts by mentioning the name of author.
Disclaimer: This is not a financial advice or any signal to buy or sell, the goal of developing such an indicator is to use for educational purposes.
Aarika Heikin AshiHello Traders,
This indicator is probably based for the people who use HA candlestick chart and frequently have to switch between Japanese candlestick and HA candles. The worry is over with this simple indicator.
Now you can enjoy both candlesticks at the same time.
AHA allows you to have 2 EMAs (mostly used for crossovers). Default values set at 8/21 EMA which we may indicate a trend reversal.
We strongly recommend you back-test everything that you need before you start using AHA.
Thank you.
((Bullish)) Candle below EMA Hello People of the Trading World...
Todays script is a basic concept of using Moving Averages and Candle Closes - this works best on Higher Timeframes and only in Bullish Conditions
"When the market is trending to the upside - we tend to see price overextend from the moving average and price revert back to the mean (Mean Reversion)"
You may ask why would you want this candle - this presents good opportunities in a trending market (NOT AN ENTRY CANDLE). This can be useful to get into existing trends which you may have missed
This candle will display when the candle close is below one of the below EMAS
9EMA
50EMA
100EMA
You can choose which one to show ie if the 21ema wasnt important but the 100ema was... turn off the 21ema and 50ema and this will display candle below the 100ema
This candle can be alerted in the settings so if price does close you wont miss it.
EXMAPLES:
If you find this script useful please leave a comment and a thumbs up :)
Horns Pattern Identifier [LuxAlgo]The following script detects regular and inverted horn patterns. Detected patterns are displayed alongside their respective confirmation and take profit levels derived from the pattern measure rule. Breakout of the confirmation levels are highlighted with labels.
This script is a continuation of the educational idea regarding horns patterns.
Settings
Threshold: Controls the maximum allowed slope of the line connecting two horns, with higher values allowing a higher slope.
Usage
Horn patterns are chart patterns introduced by Bulkowski in his book "Encyclopedia of Chart Patterns". We covered this pattern in the following post: Horn Tops & Bottoms Patterns - How To Find and Trade Them
The script allows the user to quickly determine the presence of a regular or inverted horn pattern, alongside automatically displaying the confirmation level and take profits associated with a detected pattern. These are calculated based on the rules described by Bulkowski.
Horn patterns are highlighted by a line connecting the horns, the dotted lines represent the confirmation level, once the price crosses this level a label will appear, either bullish or bearish depending on the detected pattern. The dashed line represents the take profit level.
TMA Legacy - "The Arty"This is a script based on the original "The Arty" indicator by PhoenixBinary.
The Phoenix Binary community and the TMA community built this version to be public code for the community for further use and revision after the reported passing of Phoenix Binary (The community extends our condolences to Phoenix's family).
The intended uses are the same as the original but some calculations are different and may not act or signal the same as the original.
Description of the indicator from original posting.
This indicator was inspired by Arty and Christy .
Intrabar Polarity DivergencesTradingview Pinescript just introduced a new exciting ability to get intrabars candle information from a higher time frame chart!
This indicator is based on Tradingview example but with enhanced capabilities to show the percentage of intrabars opposite bars with the ability to display the mid-day candle close price drawn by a blue line.
This indicator can show you that in some cases a GREEN candle on the daily chart, for example, can have more red candles in a lower time frame. which may or may not indicate on a change of direction :)
This is an ongoing experiment and I plan to release more indicators based on these new pinescript capabilities.
Like if you like and Follow to stay updated!
Volume Impulse & Candlestick Patterns - FontiramisuIndicator showing volume impulse & engulfing candlestick pattern.
You can set up multiple parameter for both events.
Volume Impulse :
Volume Period : Lenght of the average volume calculated.
Volume Multiplier : Factor to compare actual volume with average volume.
Engulfing Pattern :
VS avg body : Let you chose to compare body candle to average body of the last few candles (define with parameter : lenghtSizeAvgBody ), otherwise it will be compared to the last body candle.
Engulfing Multiplier : Factor to compare and validate the pattern.
CANDLE FILTER Todays scripts is based on my Pullback And Rally Candles with other meaningful candles such as Hammers and Dojis.
You can choose which Candles to show on the cart and if you want to candles to appear above or below a moving average.
If you follow my work, you may recognise some of these candles which I'm about to show you however these candles are 1) more refined and 2) has moving average filters.
Ive included a D,6H,1H Candle in this script as on different timeframes - each swing low on average has a different amount of bars within the swing low / swing high so the DPB and RD will only work on the Daily
//Pullback candle
This candle is very powerful when used with simple Price Action such as Market Structure//Demand zones and support zones. (((((WORKS BEST IN UPTRENDS AND BOTTOM OF RANGES)))))
Ive included a D,6H,1H Pullback Candle in this script as on different timeframes - each swing low on average has a different amount of bars within the swing low so the DPB will only work on the Daily
//DAILY PULLBACK (Swing Traders)
snapshot
//4H PULLBACK (Swing Traders)
snapshot
- this signal will produce more signals due to the swing low filter on the 4H
//1H PULLBACK
snapshot
- this signal has been refined due to too many candle displaying in weak areas
!!!IF YOU DONT WANT TO USE PULLBACKS DURING DOWNTRENDS THEN USE THE EMA FILTER TO TURN OFF THE PULLBACKS WHEN PRICE IS BELOW THE MOVING AVERAGE!!!
//Rally candle (My personal Favourite) (((((WORKS BEST IN DOWNTRENDS AND TOP OF RANGES)))))
This candle is very powerful when used with simple Price Action such as Market Structure//Supply zones and Resistance zones.
//DAILY RALLY(Swing Traders)
snapshot
//4H RALLY(Swing Traders)
snapshot
- this signal will produce more signals due to the swing high filter on the 4H
!!!IF YOU DONT WANT TO USE RALLIES DURING UPTRENDSTHEN USE THE EMA FILTER TO TURN OFF THE RALLIES WHEN PRICE IS ABOVE THE MOVING AVERAGE!!!
//POWERFUL DOJIS (INDECISION)
snapshot
We look for indecision in key areas to see if momentum is shifting. When combined with Pullbacks or Rallys - this will enhance the odds of a probably area.
//HAMMERS
snapshot
//MOVING AVERAGES
snapshot
Short EMA = 50
Long EMA = 200
This filter can be used when the market is trending - look out for rejections off the moving averages
Also you can chance the Short And Long EMA to choose which MA cross you want to use
snapshot
ALSO ALL THE CANDLES HAVE A ALERT CONDITIONS WHICH YOU CAN ACCESS - THIS WILL ALERT ANY CANDLE YOU CHOOSE
Please leave a like/comment on this post as this is much appreciated....
Inside Bar FinderInside bars occur when the range of a candlestick falls entirely within the previous candlestick's range. This indicates volatility contraction which often leads to volatility expansion, i.e. large price movements.
This indicator includes options such as:
- The number of consecutive inside bars required to trigger the indicator
- Signal lines to indicate the high and low of the outermost or innermost bars
Try out this indicator with different options on different timeframes to see if inside bars increase the probability of identifying the direction of price movements. Breaks or closes outside the inside or outside signal lines can be used to trigger trade signals.
Rally HTF Candle (Candlestick Analysis) Guaranteed WinnersRally Candle will signal when price is at the end of a Rally to the upside and thus entering a balance phase in the market (works on all markets)
This candle works very efficient when the market is either trending downwards or in range markets where price is at resistance. (i would avoid in uptrends but depends on the trader)
Also we can expect this candle to form when price is overextended as the theory of this script is when there is a turning point in momentum - this candle will appear and we can look long from this signal.
This candle will only work in Swing High areas and appear when below an moving average which can be changed in the settings.
This candle will work only work pn the HTF as it provides very good rexpectancy whereas the LTF has a slightly less expectancy (i will be publishing an intraday Rally candle)
This candle can be alerted to signal the Rally Candle when the bar is confirmed and not during.
The way i trade this candle is
1) Candle signal must be in probably area to increase efficiency.
2) Enter on the second candle after candle IS CONFIRMED
3) Set stop loss below Rally Candle or use ATR value
4) Trade with the trend ie only Bearish price action
5) This candle can catch extreme points in the market ie this candle projected when ETH hit aths $4841
6) Trading with a confluence along with the Rally is better than solely trading this candle
Please leave a comment.
If we get to 100 likes i will publish the script.
Inverted Hammer - Extended OptionsThis inverted hammer indicator has several options that help identify instances with a higher probability of success.
For example, inverted hammers may have a higher success rate when they:
- Breaks the previous day's high
- Close higher than the previous close
- Have a large upper wick
- Have a small lower wick
etc.
Play with the options on your chart of choice to see which options are more likely to indicate bottoms.
Pullback Candles (Candlestick Analysis) Guaranteed Winners!!!!Pullback Candle will signal when price is at the end of a pullback and entering a balance phase in the market (works on all markets)
Also we can expect a Pullback Candle during flash crashes as the theory of this script is when there is a turning point in momentum - this candle will appear and we can look long from this signal.
This candle will only work in Swing Low areas and appear when below an moving average which can be changed in the settings.
This candle will work on all timeframes - HTF provided very good rexpectancy whereas the LTF has a slightly less expectancy.
This candle can be alerted to signal the Pullback Candle when the bar is confirmed and not during.
The way i trade this candle is
1) Candle signal must be in probably area to increase efficiency.
2) Enter on the second candle after candle IS CONFIRMED
3) Set stop loss below Pullback Candle or use ATR value
4) Trade with the trend ie only bullish price action
5) This candle can catch falling knifes - we had one on LUNA before the rally to $7.50
6) Trading with a confluence along with the Pullback is better than solely trading this candle
Please leave a comment.
If we get to 100 likes i will publish the script.
Have a good weekend :)
Multiple MAs + No Trend Zone + ATR WidgetThis is my first Pine Script attempt. Nothing special, just an "all in one" for the most common things I use, and what I have found to be the most common in a lot of strategies.
Great for free and limited accounts as it combines 7 total indicators into one.
-- First 5 indicators are Independant Moving Averages:
-Each one can be set for length, as well as source and type (SMA, EMA, SMMA, WMA, VWMA) individually
-- Second type (6th) of indicator is one I find extremly useful for staying OUT of consolidation trading. It's called a "No Trend Zone" indicator I swipped from the Hoffman Startegy. Basically, its set for a small deviation (0.5) of a 35 EMA, which creates a "Band" around the 35 line. When you have this "Band" flat or with no discernable incline/decline, with price action OR some or multiple moving averages inside this banded zone, it typically indicates a zone of consolidation. This will help you identify when you may be in one of those zones, that way you don't get trapped "waiting for paint to dry" before the market starts to move again with your position, and keep you from entering should you be considering the market at that time.
The last indicator is my favorite, and one I will refine a little deeper soon.
-- The ATR widget finishes us out. This widget can be customized for colors, turned on or off, and automatically rounds the ATR (ATR period based on the chart timeframe) to a nice readable number for what you're trading. It has settings to show or not, the length, what rounding style to use (forex pip 0.0001, forex/stock/etf/indicies 0.01) where to show it on the pane, a Multiplier Factor (for stop loss calculations automatically) and the colors.
***NOTE ABOUT ATR WIDGET:
I am primarily a forex trader, so the defaults are for Forex 0.0001. If you see some odd numbers (like 55798 on a current chart), check the inputs tab on the settings, and change the "ATR Style" from "Forex 0.0001" to "Forex/Stock/ETF/Indicies 0.01", and you should arrive with the correct number.
Rally Candle (End Game ) 26/04/2022 Few Months ago I started wanted to code a candle which alerts me when a Rally may be over in Bearish Conditions and today I have created a candle which is 1. subjective but more importantly appears in areas where buying pressure is at either a climax or in the process of a decline and this is where the Rally Candle signals. This shows momentum may be shifting and these can provide some good entries.
They will only working when price is below the 200ema and in overextended markets - VERY IMPORTANT!!!
Works on all timeframe with HTF providing more price percentage than LTF
They aren’t a specific candle size however they will repaint when we see 4 higher close candles followed by a candle which has closed lower than the previous 4th.
//Candle Conditions
This candle has to be in a swing high area to be valid and on 1H and 6H but the 1H will repaint a lot of candles so when we have a point system of +20 we can assume this setup is a good setup.
//Candle Operators
You can change the color of the bar to your liking
There is a ema filter so if you want to candle to not show candles of the 50ema this operator will do the command.
Please post requests and any potential implementations I could port to pine script.
Hope you Enjoy :)
Candle Colored by Volume Z-score [Morty]This indicator colors the candles according to the z-score of the trading volume. You can easily see the imbalance on the chart. You can use it at any timeframe.
In statistics, the standard score (Z-score) is the number of standard deviations by which the value of a raw score (i.e., an observed value or data point) is above or below the mean value of what is being observed or measured. Raw scores above the mean have positive standard scores, while those below the mean have negative standard scores.
This script uses trading volume as source of z-score by default.
Due to the lack of volume data for some index tickers, you can also choose candle body size as source of z-score.
features:
- custom source of z-score
- volume
- candle body size
- any of above two
- all of above two
- custom threshold of z-score
- custom color chemes
- custom chart type
- alerts
default color schemes:
- green -> excheme bullish imbalance
- blue -> large bullish imbalance
- red -> excheme bearish imbalance
- purple -> large bearish imbalance
- yellow -> low volume bars, indicates "balance", after which volatility usually increases and tends to continue the previous trend
Examples:
* Personally, I use dark theme and changed the candle colors to black/white for down/up.
Volume as Z-score source
Any as Z-score source, more imbalances are showed
Wick Pressure by SiddWolfMultiple Wicks forming at OverSold & OverBought levels create Buying and Selling Pressure. This Script tries to capture the essence of the buy and sell pressure created by those wicks. Wick pressure shows that the trend is Exhausted.
How it works:
This Wick Pressure Indicator checks for three candles forming the wicks in overbought and oversold zones. The zones are set by RSI and can be changed in settings. Those three candles should form a bit long wick and length of the wick is determined by ATR. The ATR multiple can be changed from settings. And then the script draws a box in the area formed by three candle wicks.
Confluence:
This indicator should not be used on its own. You should include it in your existing trading strategy. Any indicator should be rigorously tested before making any real trades.
Settings is the Key:
Settings are key to all of my indicators. Play around with it a bit. Change the ATR multiplier. Read the tooltips to understand what each settings mean. Tooltips are the (i) button in-front of each settings.
FAQs:
Q. Does the indicator Repaint ?
--- No. None of my indicators repaints. What you see now is what's drawn in real time.
Q. Indicator doesn't show anything ?
--- Maybe you've messed up the settings so reset it. or try different coin/stock.
Q. Does this indicator give financial advice?
--- No. Nope. Nein. Não. नहीं.
Conclusion:
This indicator is very basic but if used correctly it can be very powerful. Hit me up if you'd like to see the screener/scanner for this or any of my indicators. If you have any questions or suggestions feel free to comment below. I'd love to connect with you. Thank you.
~ SiddWolf
Volume Filtered *All Candlestick Patterns* [KT] Hello!
This script uses TradingView's *All Candlestick Patterns* indicator and includes a volume filter.
The frequency of each candlestick pattern is recorded in addition to the subsequent session's outcome - higher or lower close.
The requisite volume for the pattern is configurable; formations will not be distinguished when volume is less than the defined lower threshold.
For example, setting the volume threshold to 10% forces the script to identify candlestick patterns in which volume for the session (candle) is 10% greater than the volume moving average. All candlestick patterns with volume less than (1.10 * volume MA) are discounted.
The script counts the frequency of each pattern - the number of times the pattern occurred - in addition to the next candle's outcome.
Pertinent statistics are displayed in the table, which can be hidden.
I plan on working on the script quite a bit more; please comment a suggestion if you have one! What else should be included?
Candles Colored Green/Red According To Buy & Sell PressureCANDLES COLORED GREEN OR RED ACCORDING TO BUY & SELL PRESSURE
This indicator paints each candle green, red or blue depending on whether the buy/sell pressure for that candle is bullish, bearish or neutral.
***TURN OFF NORMAL CANDLE COLORS***
For this script to show properly on the chart, make sure you go to chart settings(gear icon in top right corner) and in the symbol tab, uncheck body, borders and wick.
***HOW TO USE***
When the directional movement index indicator shows more buying pressure than selling pressure, the candle will appear lime green. This indicates bullish buying pressure.
When the directional movement index indicator shows more selling pressure than buying pressure, the candle will appear red. This indicates bearish selling pressure.
When the directional movement index indicator shows the same amount of buy and sell pressure, the candle will appear blue. This indicates neutral buy/sell pressure.
Use the color changes to see if there is more buying or selling to pinpoint reversals and understand current market buying. Wait to enter or exit positions until the candles turn the opposite color.
***MARKETS***
This indicator can be used as a signal on all markets, including stocks, crypto, futures and forex.
***TIMEFRAMES***
This DMI color coded candlestick indicator can be used on all timeframes.
***TIPS***
Try using numerous indicators of ours on your chart so you can instantly see the bullish or bearish trend of multiple indicators in real time without having to analyze the data. Some of our favorites are our Auto Fibonacci, Directional Movement Index, Color Coded Buy & Sell Pressure Volume Profile, Auto Support And Resistance and Money Flow Index in combination with this Buy & Sell pressure Candle indicator.
AbdulLibraryLibrary "AbdulLibrary"
The library consists of three sections:
Technical Analysis Functions - A collection of tools commonly used by day traders
Trading Setup Filters Functions - A number of filters that help day traders to screen trading signals
Candlestick Pattern Detection Functions - To detect different candlestick patterns that are used in day trading setups
Note that this would have been possible without the help of @ZenAndTheArtOfTrading as I build-up this library after completing his pine script mastery course so big thanks to him
The content of the library are:-
fibLevels(preDayClose, preDayHigh, preDayLow) Calculates Daily Pivot Point and Fibonacci Key Levels
Parameters:
preDayClose : The previous day candle close
preDayHigh : The previous day candle high
preDayLow : The previous day candle low
Returns: Returns Daily Pivot Point and Fibonacci Key Levels as a tuple
bullishFib(canHigh, canLow, fibLevel) Calculates Fibonacci Levels in Bullish move
Parameters:
canHigh : The high of the move
canLow : The low of the move
fibLevel : The Fib level as % you want to calculate
Returns: Returns The Fib level for the Bullish move
bearishFib(canHigh, canLow, fibLevel) Calculates Fibonacci Levels in Bearish move
Parameters:
canHigh : The high of the move
canLow : The low of the move
fibLevel : The Fib level as % you want to calculate
Returns: Returns The Fib level for the Bearish move
getCandleSize() Calculates the size of candle (high - low) in points
Returns: Returns candle size in points
getCandleBodySize() Calculates the size of candle (close - open) in points
Returns: Returns candle body size in points
getHighWickSize() Calculates the high wick size of candle in points
Returns: Returns The high wick size of candle in points
getLowWickSize() Calculates the low wick size of candle in points
Returns: Returns The low wick size of candle in points
getBodyPercentage() Calculates the candle body size as % of overall candle size
Returns: Returns The candle body size as % of overall candle size
isSwingHigh(period) Checks if the price has created new swing high over a period of time
Parameters:
period : The lookback time we want to check for swing high
Returns: Returns True if the current candle or the previous candle is a swing high
isSwingLow(period) Checks if the price has created new swing low over a period of time
Parameters:
period : The lookback time we want to check for swing low
Returns: Returns True if the current candle or the previous candle is a swing low
isDojiSwingHigh(period) Checks if a doji is a swing high over a period of time
Parameters:
period : The lookback time we want to check for swing high
Returns: Returns True if the doji is a swing high
isDojiSwingLow(period) Checks if a doji is a swing low over a period of time
Parameters:
period : The lookback time we want to check for swing low
Returns: Returns True if the doji is a swing low
isBigBody(atrFilter, atr, candleBodySize, multiplier) Checks if a candle has big body compared to ATR
Parameters:
atrFilter : Check if user wants to use ATR to filter candle-setup signals
atr : The ATR value to be used to compare candle body size
candleBodySize : The candle body size
multiplier : The multiplier to be used to compare candle body size
Returns: Returns Boolean true if the candle setup is big
isSmallBody(atrFilter, atr, candleBodySize, multiplier) Checks if a candle has small body compared to ATR
Parameters:
atrFilter : Check if user wants to use ATR to filter candle-setup signals
atr : The ATR value to be used to compare candle body size
candleBodySize : The candle body size
multiplier : The multiplier to be used to compare candle body size
Returns: Returns Boolean true if the candle setup is small
isHammer(fibLevel, colorMatch) Checks if a candle is a hammer based on user input parameters and candle conditions
Parameters:
fibLevel : Fib level to base candle body on
colorMatch : Checks if user needs for the candel to be green
Returns: Returns Boolean - True if the candle setup is hammer
isShootingStar(fibLevel, colorMatch) Checks if a candle is a shooting star based on user input parameters and candle conditions
Parameters:
fibLevel : Fib level to base candle body on
colorMatch : Checks if user needs for the candel to be red
Returns: Returns Boolean - True if the candle setup is star
isBullEngCan(allowance, period) Check if a candle is a bullish engulfing candle
Parameters:
allowance : How many points the candle open is allowed to be off (To allow for gaps)
period : The lookback period for swing low check
Returns: Boolean - True only if the candle is a bullish engulfing candle
isBearEngCan(allowance, period) Check if a candle is a bearish engulfing candle
Parameters:
allowance : How many points the candle open is allowed to be off (To allow for gaps)
period : The lookback period for swing high check
Returns: Boolean - True only if the candle is a bearish engulfing candle
isBullDoji(maxSize, wickLimit, colorFilter) Check if a candle is a bullish doji candle
Parameters:
maxSize : Maximum candle body size as % of total candle size to be considered as doji
wickLimit : Maximum wick size of one wick compared to the other wick
colorFilter : Checks if the doji is green
Returns: Boolean - True if the candle is a bullish doji
isBearDoji(maxSize, wickLimit, colorFilter) Check if a candle is a bearish doji candle
Parameters:
maxSize : Maximum candle body size as % of total candle size to be considered as doji
wickLimit : Maximum wick size of one wick compared to the other wick
colorFilter : Checks if the doji is red
Returns: Boolean - True if the candle is a bearish doji
isBullOutBar() Check if a candle is a bullish outside bar
Returns: Boolean - True if the candle is a bullish outside bar
isInsideBar() Check if a candle is an inside bar
Returns: Returns Boolean - True if a candle is an inside bar
3 Candle Strike StretegyMainly 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~