HIgher High Higher Close with increasing volume on two consecutive candles


Category:
0
0

Hi Pete,

Can you please write a code for two consecutive candles which creates a buy or sell alert sound signal with arrow on the second candle if the following conditions are met.

1 – First two candles fulfill higher high higher close and higher open and the second candles open is not lower than the first candle’s close and both candles should have been closed in the 10% area of the high value.
2- second candle’s volume has to be higher than the first candle.

Thank you for time. Much appreciated.

Shaishav

 

Marked as spam
Posted by (Questions: 49, Answers: 62)
Asked on November 9, 2019 7:08 pm
180 views
0
Private answer

The way I read your specifications, this implies a 3 bar pattern. Because you have two consecutive candles of higher high, open and close. This means we must start three bars back when comparing these values.

I have not tested this code but I think it should work as requested.

def higherHigh = high > high[1];
def higherClose = close > close[1];
def higherOpen = open > open[1];
def topTenPercent = close >= high * 0.9;
def candlePattern = higherHigh and higherHigh[1] and higherClose and higherClose[1] and topTenPercent and open > close[1];
plot signal = candlePattern and volume > volume[1];
signal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
signal.SetDefaultColor(Color.CYAN);
signal.SetLineWeight(3);
Alert(signal, "Higher High & Volume", Alert.BAR, Sound.RING);

Marked as spam
Posted by (Questions: 37, Answers: 4087)
Answered on November 10, 2019 8:40 am
0
How can this study be put into a scan?
( at May 12, 2020 11:36 am)