Question about "Price" in a specific scan.

fungus12

Member
So here's my issue. Currently I have a scan set up to scan for breakouts above the upper band of the Bollinger Band on the 1h timeframe. Here's how it looks:

G7p4CV9.png


This is my issue though: I don't want to wait for the candle to close to get the alert, essentially I want to get the alert as soon as the candle breaks above the BB in real-time. Now I believe I could technically use "open" instead of "close" for that (unless you have to wait for the close for that as well which I don't think you do). The issue with using "open" in my case though is I don't need the candle (specifically a green candle) to be fully above the upper band of the BB. I just need some part of the candle to be above it, I don't care what it is. The only variable I've found to mimic that the closest is "close", but as I said the issue with "close" is you have to wait for the candle to close to actually get that alert (at least I'm pretty sure that's how it works). But that's too slow.

So essentially what I'm asking is if there an alternative I can use instead of "close" to get the real-time alert that I want. Thanks in advance.
 

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

@fungus12 Why wouldn't you just run it on a lower timeframe?
I generally find the 1h timeframe a lot more accurate. Sometimes I'll have false signals on the 5m and 15m. I still use those for entries/exits but it needs to be confirmed on the 1h. Even if the candle doesn't close, the 1h candle still moves around until it closes and often times if it breaks the upper BB it tends to stay that way. So that's essentially why I prefer to keep it to the 1h.

Of course if there's no alternative I'll have to use the lower timeframes, I'm just wondering if there actually is an alternative.
 
@fungus12 Use high or low?
Yea I was thinking about trying highs but doesn't the same rule for "close" apply to highs and lows? That being the candle needs to close first before it registers. Please correct me if I'm wrong on that.

Also just another quick question about the "within" qualifier for x number of bars in the scanner: that qualifier includes the current bar, correct?
 
So here's my issue. Currently I have a scan set up to scan for breakouts above the upper band of the Bollinger Band on the 1h timeframe. Here's how it looks:

G7p4CV9.png


This is my issue though: I don't want to wait for the candle to close to get the alert, essentially I want to get the alert as soon as the candle breaks above the BB in real-time. Now I believe I could technically use "open" instead of "close" for that (unless you have to wait for the close for that as well which I don't think you do). The issue with using "open" in my case though is I don't need the candle (specifically a green candle) to be fully above the upper band of the BB. I just need some part of the candle to be above it, I don't care what it is. The only variable I've found to mimic that the closest is "close", but as I said the issue with "close" is you have to wait for the candle to close to actually get that alert (at least I'm pretty sure that's how it works). But that's too slow.

So essentially what I'm asking is if there an alternative I can use instead of "close" to get the real-time alert that I want. Thanks in advance.

Fun,

In the Stock Hacker input menu where close and high and low are found, there is the word "Last". The Thinkscript manual's description of it is below. Could this be what you want...

LAST​

Syntax​

PriceType.LAST

Description​

Use it with Fundamental functions to state that a last price needs to be returned.
 
Fun,

In the Stock Hacker input menu where close and high and low are found, there is the word "Last". The Thinkscript manual's description of it is below. Could this be what you want...

LAST​

Syntax​

PriceType.LAST

Description​

Use it with Fundamental functions to state that a last price needs to be returned.
No that's not it. PriceType.LAST actually isn't under the "Price" section, it's under the "Parameters" section which does something different. It just determines which parameter is going to be returned as opposed to which variable, from what I can tell anyway. The "price" variable comes before the parameter.

@fungus12 High/Low does not need to close for it to be verified. If you're looking for an alert as soon as candle breaks above BB then high will do it for you.
Awesome. Thanks dude. Just one more question, the "within x bars" condition includes the current bar correct?
 
I'm posting this from my phone and I can't view the image you posted very well, so keep that in mind. But here are a few pointers.

The latest price and the close are the same thing while the bar is still active.

Scans do not update in real time, they update periodically.

You can get real time alerts if you have the script up and running on a chart.
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
324 Online
Create Post

Similar threads

Similar threads

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