Candles

 In trading, candlestick charts are used to represent price movements over a specific period. Each candlestick has a "body" and "wicks" (also known as shadows) that show the open, high, low, and close prices for a particular time frame. There are several types of candlestick patterns, each with its own name and meaning. Here are some common candlestick names:


Single Candlestick Patterns:


1. Doji – A candlestick with a very small body, indicating indecision in the market.




2. Hammer – A small body with a long lower wick, suggesting a potential reversal after a downtrend.




3. Inverted Hammer – A small body with a long upper wick, indicating a potential reversal after an uptrend.




4. Marubozu – A candlestick with no wicks, where the open and close are the extremes, indicating strong bullish or bearish sentiment.



5. Spinning Top – A candlestick with a small body and long wicks on both sides, signaling indecision.





Bullish Reversal Patterns:


1. Bullish Engulfing – A small bearish candle followed by a larger bullish candle that engulfs it.



2. Morning Star – A three-candle pattern that indicates a reversal from bearish to bullish.



3. Hammer – A single candle that suggests a potential reversal from a downtrend to an uptrend.



4. Piercing Line – A bullish candlestick that opens lower but closes above the midpoint of the previous day's bearish candlestick.




Bearish Reversal Patterns:


1. Bearish Engulfing – A small bullish candle followed by a larger bearish candle that engulfs it.



2. Evening Star – A three-candle pattern that indicates a reversal from bullish to bearish.



3. Shooting Star – A single candlestick with a small body, a long upper wick, and little to no lower wick, signaling a potential reversal from an uptrend to a downtrend.



4. Dark Cloud Cover – A bearish candlestick pattern that opens above the previous day’s close but closes below the midpoint of the previous day's candlestick.




Continuation Patterns:


1. Rising Three Methods – A pattern consisting of a long bullish candle followed by three small bearish candles and then another long bullish candle, signaling a continuation of the uptrend.



2. Falling Three Methods – A pattern with a long bearish candle, three small bullish candles, and then another long bearish candle, signaling a continuation of the downtrend.



3. Flag – A rectangular shape that forms after a sharp price movement, indicating a short-term consolidation before the trend continues.



4. Pennant – A small symmetrical triangle that forms after a strong price movement, indicating consolidation before the trend resumes.




These are just a few of the most common candlestick patterns used in technical analysis. Traders use these patterns to predict price movements and potential trend reversals in the market.




Custom Indicator


//@version=5

indicator("RSI with Candlestick Strategy", overlay=true)


// Define parameters

rsiPeriod = input.int(14, title="RSI Period", minval=1)

rsiOverbought = input.int(70, title="RSI Overbought", minval=50, maxval=100)

rsiOversold = input.int(30, title="RSI Oversold", minval=0, maxval=50)


// Calculate RSI

rsi = ta.rsi(close, rsiPeriod)


// Candlestick Patterns Detection (manually defined)


// Bullish Engulfing: Current candle is bullish and engulfs the previous bearish candle

bullishEngulfing = close > open and open[1] > close[1] and close > open[1] and open < close


// Bearish Engulfing: Current candle is bearish and engulfs the previous bullish candle

bearishEngulfing = close < open and open[1] < close[1] and close < open[1] and open > close


// Doji: Small body (close and open are very close)

doji = abs(close - open) <= (high - low) * 0.1


// Hammer: Small body, long lower wick, small upper wick

hammer = (high - close) > 2 * (close - open) and (high - low) > 3 * (close - open) and (open - low) < 0.2 * (high - low)


// Inverted Hammer: Small body, long upper wick, small lower wick

invertedHammer = (close - low) > 2 * (open - close) and (high - close) > 2 * (close - open) and (high - low) > 3 * (close - open)


// Define buy and sell conditions based on candlestick patterns and RSI

buyCondition = (bullishEngulfing or hammer or invertedHammer) and rsi < rsiOversold

sellCondition = (bearishEngulfing or doji) and rsi > rsiOverbought


// Plotting signals on the chart

plotshape(series=buyCondition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")

plotshape(series=sellCondition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")


// Strategy execution (buy and sell)

if (buyCondition)

    strategy.entry("Buy", strategy.long)


if (sellCondition)

    strategy.close("Buy") // Close long position

    strategy.entry("Sell", strategy.short) // Open short position





0 Comments