Create Indicator Using following details: A Demand Zone in trading is a price area where buying interest is strong enough to prevent the price from falling further. In this zone, traders expect that the demand will push the price higher due to the concentration of buy orders.

What Does a Demand Zone Look Like?
Visually, a demand zone typically appears as a cluster of candles near a support level, where the price has been unable to fall further and often reverses upward. It's often characterized by:

Strong bullish candles: These are large green candles with small wicks or no wicks, indicating that buyers controlled the price movement during the formation of the candle.
Consolidation periods: Before the price reverses, the market may show a period of sideways movement with small candles or indecision candles (like Doji or Spinning Tops), signaling that selling pressure is weakening and buyers are stepping in.
Rejection wicks: Candles with long lower wicks indicate that sellers pushed the price down, but buyers were able to bring it back up, showing strong demand in that area.
Types of Demand Zones
Rally-Base-Rally (RBR):

A demand zone is formed when there is a rally in price, followed by a brief consolidation (base), and then another rally.
Rally: A sequence of bullish candles with strong upward momentum.
Base: A period of consolidation with small candles indicating indecision.
Rally: The final upward move after the base, showing that demand still outpaces supply.
Candles in the Base: Small, narrow candles that could be Doji, Spinning Tops, or candles with wicks indicating a balance between buyers and sellers before the next rally.
Drop-Base-Rally (DBR):

This demand zone forms after a drop in price, followed by a consolidation (base), and then a rally.
Drop: A bearish move in price with strong red candles.
Base: A range of small candles signaling that the downward momentum is exhausted, and buyers are stepping in.
Rally: A strong upward move after the base, driven by increased demand.
Candles in the Base: Similar to RBR, the candles in this base are usually small and show little price movement as the market prepares to reverse upward.
Deep Dive Into Candle Size in Demand Zones
Candle size plays a crucial role in identifying a demand zone. Here's a breakdown:

Rally Candles (Before and After the Base):

Body Size: The body of the bullish candle should be large relative to the base candles, showing that buyers are in control. For a good demand zone, the body should cover at least 60-80% of the entire candle, with minimal wicks.
Wicks: Short upper wicks show that sellers were unable to push the price back down, which is a strong bullish signal.
Volume: High volume is a sign of aggressive buying, which reinforces the validity of the demand zone.
Base Candles (Within the Base):

Body Size: The candles in the base should be small, indicating indecision. If the bodies are large, it may indicate volatility and a weak base.
Wicks: These candles may have long wicks on both sides, showing that both buyers and sellers are active but neither side is able to dominate. Long lower wicks can be a sign that buyers are defending the zone.
Types of Candles: You might see Doji, Spinning Tops, or small-bodied candles with large wicks, indicating that the market is neutral and preparing for a reversal.
Volume:

During the formation of the base, volume should generally decrease, showing that the market is consolidating. When the demand zone is hit again and the price reacts, volume should spike, confirming the presence of strong buying interest.
Characteristics of a Strong Demand Zone
Proximity to Support Levels: A demand zone near a major support level strengthens the likelihood of a reversal.
Freshness: The more times a demand zone is hit, the weaker it becomes. A fresh demand zone (one that hasn’t been touched before) is more likely to hold.
Sharp Move Away from the Zone: After the base, a strong rally away from the zone indicates a significant imbalance between buyers and sellers, which is a hallmark of a strong demand zone.
Volume: High volume on the rally out of the zone is an additional confirmation of the strength of the zone.
Advanced Considerations for Candle Size
If you’re developing an indicator for demand zones, these details about candle size can help:

Minimum/Maximum Base Candle Size: Define a range for the size of candles in the base relative to the rally. For instance, the base candles could be limited to a percentage of the average true range (ATR) of the recent price action.

Sharpness of the Rally: The ratio of the rally candle size to the base candle size can be an indication of the strength of the zone. A strong rally should consist of large-bodied candles that are significantly larger than the base candles.

Volume Threshold: You could set a volume threshold for the candles in the rally phase. For instance, if volume increases by 50% or more on the breakout from the base, the zone is likely stronger.

Zone Width: The width of the zone (from the top of the highest base candle wick to the bottom of the lowest base candle wick) could be a feature that the indicator can calculate to help define the strength or validity of the demand zone.

By integrating these rules into the indicator, you ensure that only high-probability demand zones are highlighted on the chart.