American Bulls

Solution
haha54, according to their website's description and chart this appears to be a bullish Harami that generates a buy signal at the close of the current bar and stoploss at the close of the previous bar. It's an interesting little buying pattern. I believe it needs more filters for context and maybe stricter definition of the nature of the Harami to find the best versions of the pattern.

I've pasted a chart and script that recreates this signal. Buy at the blue line with stop at the red line.

I should note that TOS does have a Harami arrow indicator. It's not obvious because it's not in the regular list of indicators; it's under "Patterns" --> "Select Patterns" on the upper right side of the chart.

Screenshot (87).png



Code:
# Harami_AmBulls
#...
haha54, according to their website's description and chart this appears to be a bullish Harami that generates a buy signal at the close of the current bar and stoploss at the close of the previous bar. It's an interesting little buying pattern. I believe it needs more filters for context and maybe stricter definition of the nature of the Harami to find the best versions of the pattern.

I've pasted a chart and script that recreates this signal. Buy at the blue line with stop at the red line.

I should note that TOS does have a Harami arrow indicator. It's not obvious because it's not in the regular list of indicators; it's under "Patterns" --> "Select Patterns" on the upper right side of the chart.

Screenshot (87).png



Code:
# Harami_AmBulls
# Question from haha54 on 10-17-23; bullish Harami with buy at close and sell at prev bar’s close

input price = close;
input offset1 = 1;

def Upclose = close > open;
def LastBarIsBear = close[1] < open[1];
def BodyEngulfed = close < open[1] and open > close[1];
def HighBar = high[2] > high[1];

plot Harami_AmBulls = Upclose and LastBarIsBear and BodyEngulfed and HighBar;
plot Buy = if Harami_AmBulls then close else double.NaN;
plot Buy01 = Buy[offset1];

plot Stop = if Harami_AmBulls then close[1] else double.NaN;
plot Stop01 = Stop[offset1];

Harami_AmBulls.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
Harami_AmBulls.SetDefaultColor(Color.MAGENTA);
Harami_AmBulls.SetLineWeight(3);

Buy.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Buy.SetDefaultColor(Color.BLUE);
Buy.SetLineWeight(2);
Stop.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Stop.SetDefaultColor(Color.RED);
Stop.SetLineWeight(2);

Buy01.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Buy01.SetDefaultColor(Color.BLUE);
Buy01.SetLineWeight(2);
Stop01.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
Stop01.SetDefaultColor(Color.RED);
Stop01.SetLineWeight(2);
 
Last edited by a moderator:
Solution

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
233 Online
Create Post

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top