Reversal Candle Signal On 30 Min TF


Category:
0
0

Hi Pete,

I am trying to make the code getting idea from your recent solution.

I am trying to get the signal and arrow on 30 min candle for a possible reversal.

My conditions are

1- Needs a signal on the same candle when that particular candle’s open is <=previous bar close, and Low is<previous bar low and high<previous bar high, but close>previous bar close and close is in the top 10 percent of the high and with increasing volume.

I have tried this so far for possible reversal signal on bottom with no success since no arrows are being plotted yet.

def LowerOpen = open < open[1];
def LowerLow = Low < Low[1];
def higherClose = Close > Close[1];
def LowerHigh = High < High[1];
def topTenPercent = close >= high * 0.9;
def candlePattern = LowerOpen and LowerOpen[1] and higherClose and higherClose[1] and LowerLow and LowerLow[1] and topTenPercent and open <= close[1];
plot signal = candlePattern and volume > volume[1];
signal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
signal.SetDefaultColor(Color.Green);
signal.SetLineWeight(1);
Alert(signal, “LowerLow, LowerOpen, LowerHigh, but Higher Close with increasing volume on two consecutive candles”, Alert.BAR, Sound.RING);
I also need the code for possible reversal at the top vice versa. Please help.

Thank you,
Shaishav

RESOLVED
Marked as spam
Posted by (Questions: 49, Answers: 62)
Asked on November 10, 2019 2:03 pm
130 views
0
Private answer

Keep in mind that this Q&A forum is here to provide a searchable knowledge-base of custom solutions that benefit the majority of our viewing audience. Each and every post in the forum should be something that a large number of our audience is going to recognize and use.

When referring to another source, always provide a link to that source. This applies whether that source is in this very forum or even from another website. This helps the rest of our viewing audience understand the full context of your request and make the best use of the solution.

Here is the link for the previous solution you reference in your request:

https://www.hahn-tech.com/ans/higher-high-higher-close-with-increasing-volume-on-two-consecutive-candles/

However the solution to your current request doesn't really need anything from that previous solution, except for one line. Which is the line that determines the close is within 10% of the high.

So for this solution I pretty much just start from scratch:

def pattern = open <= close[1] and low < low[1] and high < high[1] and close > close[1];
def topTenPercent = close >= high * 0.9;
plot signal = pattern and topTenPercent and volume > volume[1];
signal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
signal.SetDefaultColor(Color.Green);
signal.SetLineWeight(1);

From your question title I see that you mentioned a specific time frame. The time frame is selected at the chart level. So you can apply this to whatever time frames are supported for charts of Thinkorswim.

If you are trying to learn how to build these for yourself. I will point out that the first line of code is a direct word for word translation of the description you gave:

open is <=previous bar close, and Low is<previous bar low and high<previous bar high, but close>previous bar close

 

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on November 11, 2019 10:05 am
0
Thank you Pete. I will remember to post the previous link in future.
( at November 11, 2019 10:25 pm)