ATR Clouds based on Highest Lowest Hammer Pattern


Category:
0
0

This is hard to explain but I’ll try my best to keep it simple.  I have a hammer pattern I like to keep on my charts

def UpperWick = high – Max(open, close);
def LowerWick = Min(open, close) – low;

# Length of the candle’s body
def CandleBody = BodyHeight();

# def Hammer
def Hammer = (lowerWick / CandleBody >= 1.5) and (upperWick / CandleBody <= 1);

#def Inverted hammer
def InvertedHammer = (lowerWick / CandleBody <= 1.5) and (upperWick / CandleBody >= 1);

plot signalHammer = Hammer;
plot signalInvertedHammer = InvertedHammer;

signalHammer.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
signalHammer.AssignValueColor(Color.GREEN );

signalInvertedHammer.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
signalInvertedHammer.AssignValueColor(Color.RED );

 

The screenshot I’m using is JBHT from 1/17/20 at 5m 1/d.

 

What I want to accomplish is this.  Once a hammer appears and the next candle is in a different direction (bull => bear / bear =>Bull).

 

In case of Bull => Bear

I want a red cloud going 1 ATR above the high of the wick with the hammer and the cloud to go down 1/4 ATR.

 

In case of Bear => Bull

I want a green cloud going 1 ATR below the wick of the wick with the hammer and the cloud to go up 1/4 ATR.

 

Is it possible only to draw these clouds based on HoD and LoD?

 

Thanks!

Attachments:
Marked as spam
Posted by (Questions: 5, Answers: 3)
Asked on April 5, 2020 7:18 pm
149 views
0
Private answer

Couple things.

One is that it will not be possible to plot a cloud on the chart exactly has you have indicated in your screenshot. The cloud would begin right at the point of the highest or lowest hammer up to that point in the chart. Should any subsequent higher or lower hammer appear on the chart the previous cloud would remain as it was but would adjust to the new highest or lowest level until a new highest or lowest appeared on the chart.

This might be hard to visualize, but the cloud would not form a solid bar across the top and another across the bottom. That would require the code to read the future. Which at this current state of science and technology is impossible. (or so I am told).

Second detail I need to explain. The solution to this would far exceed the amount of time I permit for free custom solutions in the Q&A forum. I have had clients pay for much less complex solutions so I have to respect them by not giving away solutions of this complexity.

You submit this as a custom project request, but we'll need a bit more details before we can attempt to solve this. But as I described above, it will not turn out the way you have indicated on your screenshot.

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on April 6, 2020 7:36 am
0
I'm not against paying. I found this from this video so maybe cloud is not the correct verbiage but is this possible? https://pasteboard.co/J2Ah9wH.png
( at April 6, 2020 10:42 am)
0
There is one way to achieve this however until one of your candlestick patterns appear on the chart there will be no shaded area (cloud is the correct terminology for Thinkorswim). So when the first new high hammer appears the upper cloud can be applied to the chart at that level. When the next hammer appears the cloud will move to that new high if that hammer pattern is higher than the previous. The reverse is true for the bottom cloud. Until a hammer appears as a new low on the chart the lower cloud will not be applied. Once a new low hammer appears the cloud will be applied at that level. If a new lower hammer appears on the chart the cloud will move that new low. All of this can be done so long as chart is set to intraday and ONLY the current trading session will display any clouds. Previous days will not display any clouds whatsoever.
( at April 6, 2020 11:14 am)
0
Thanks Pete! That sounds fantastic. How do I inquire about price?
( at April 7, 2020 6:26 pm)
0
All the details about the professional services we offer as well as submitting a custom project request are found on the following webpage: https://www.hahn-tech.com/about/
( at April 7, 2020 6:56 pm)