OptionsTrader
New member
I am essentially looking for a Wick larger than the body and the body to close in the top 80% of the candle in the opposite direction of the wick. Also the Candle must be greater than 20 points in total. This is what I have so far but it's not exactly right (also this is just for a bullish reversal a bearish would one just be the same thing but the opposite)
Code:
declare upper;
def CandleRange = high - low;
Input TargetPercentage = 80.0;
def PercentOfRange = 100 * CandleRange;
def Wick = CandleRange - BodyHeight();
def StrongCandle = CandleRange > 20;
def BullReversal = StrongCandle and close > CandleRange;
def Bullish = Close > Open;
def BullWick = Wick > BodyHeight();
def BullClose = PercentOfRange >= TargetPercentage;
def BullReversalSignal = StrongCandle and BullReversal and Bullish and Bullwick and BullClose;
plot REVERSALBULLSIGNAL = BullReversalSignal;
REVERSALBULLSIGNAL.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
REVERSALBULLSIGNAL.SetDefaultColor(Color.YELLOW);
REVERSALBULLSIGNAL.SetLineWeight(3);