Signal after Consolidation


Category:
0
0

Hi,

I have the folowing script (see attachment) and I’m looking for a way to get a Buy signal, Bullish and Bearish, when there is higher than average volume for 2 consecutive candles. The Buy signal should be as soon as second volume is higher than first volume after the consilidation.

 

Script and Desired Bullish Buy Signal Attached

 

Thank you

Attachments:
Marked as spam
Posted by (Questions: 1, Answers: 0)
Asked on October 3, 2020 5:45 am
149 views
0
Private answer

rec trackConsolidationHigh = if !IsNaN(BoxHigh[1]) and IsNaN(BoxHigh) then BoxHigh[1] else trackConsolidationHigh[1];
plot signal = close > trackConsolidationHigh and IsNaN(BoxHigh) and volume > volume[1] and volume[1] > volume[2];plot signal = IsNaN(BoxHigh) and volume > volume[1] and volume[1] > volume[2];

Those two lines can be added to the code you provided. The first line checks for when the box has ended and keeps track of the high of the box. The second line first checks if the current candle is higher than the high of the box, then checks if the last two bars have had higher volume than previous.

Marked as spam
Posted by (Questions: 37, Answers: 4087)
Answered on October 3, 2020 9:24 am