Different time frames in scans

Birdshaw

New member
Hi All!

Was wondering if anyone could help me out. I want to set up a scanner based on conditions between 30min and 1hr time frames of multiple indicators. To give an example something akin to saying:

30 min:
MACD Value >= MACD Avg
RSI > 60
Aroon Up >= Aroon Down


1hr:
MACD Value >= MACD Avg
RSI > 60
Aroon Up >= Aroon Down

And I know that right now that seems very easy as I just use the provided studies based on these conditions and change the aggregation period that's plainly available. BUT here's the kicker, I want to be able to say that if 4 out of 6 of those potential indicators are true, alert me. That is what I don't know how to accomplish because of the different time frames being used and that if I try to incorporate if statements I get a complexity error. Does anyone have any idea how to do this or if there is some kind of workaround?

Much appreciated all and thanks in advance!!
 
Quick addition: I realize I could break it all into separate watchlist columns but what I'm actually after here is to get notified of when the specific setup occurs. I have already made watchlist columns that work, but since they can't send me a notification it's not as useful in my humble opinion.
 
The generally accepted wisdom is that ToS does NOT allow multiple timeframes within a scan.

That said, an idea occurred to me as I was reading your question.

It only works for two aggregation periods, and only when the criteria can be easily separated into two steps.

We can scan on a secondary aggregation within the results of a primary aggregation scan.

Eawgh6e.png

Figure 1. Note that the scan being run is a saved scan, which aggregates on a DAY timeframe. It is set to scan in the s&p 500.

ZHyjyvi.png

Figure 2. This is the second timeframe for our composite scan. It is running on 10 MINUTES. Notice that the "Scan In" field is set to the name of the first study from above.

This returns scan results true for both timeframes.

Hope that helps,
-mashume
 
Last edited:
The generally accepted wisdom is that ToS does NOT allow multiple timeframes within a scan.

That said, an idea occurred to me as I was reading your question.

It only works for two aggregation periods, and only when the criteria can be easily separated into two steps.

We can scan on a secondary aggregation within the results of a primary aggregation scan.

Eawgh6e.png

Figure 1. Note that the scan being run is a saved scan, which aggregates on a DAY timeframe. It is set to scan in the s&p 500.

ZHyjyvi.png

Figure 2. This is the second timeframe for our composite scan. It is running on 10 MINUTES. Notice that the "Scan In" field is set to the name of the first study from above.

This returns scan results true for both timeframes.

Hope that helps,
-mashume
Oh, now that is really intriguing! Thanks so much for the idea @mashume. I'll give this a shot over the weekend and let you know how it worked out for me. Gah, I was so sure there was no way to make it happen so I am super stoked to test this out!!
 
Oh, now that is really intriguing! Thanks so much for the idea @mashume. I'll give this a shot over the weekend and let you know how it worked out for me. Gah, I was so sure there was no way to make it happen so I am super stoked to test this out!!
I wanted to ask a question. I have really tried to write a swim script to do this but have not had any success. I was so frustrated I gave up but thought if I told you what my idea was that it could help many if someone was able to think of some script for this. Ok, here goes - - - What if, there was a way for a scanner, (any scanner used, I think Momo was a goood one), and with this scanner, it was able to send you an alert anytime a stock on the scanner hit a particular criteria. For example, if you had the scanner notify you when a stock was 2 or 3 percent above its last price and had the volume going up somewhat, then you could get a jump on the stock before Benzinga Charlie even announced it? :) :)

So, if the notification was based on the candle stick (sorry I said bar) going up maybe 2 or 3 times, with the stock price going up 2 or 3 percent and the volume gradually increasing, if the a scanner notified you of this change you'd be able to see all the changes for whatever scanner you used! :) The problem is we haven't even done any coding in class yet, just talking about information systems and stuff. So, I figured I'd as you folks if you had some idea how to do this. Plus, maybe it would really boost some other people subscribing as well too since this site would have figured out a secret to looking ahead.

Do you think this is possible?

Thanks very much

Homeplate
 
The generally accepted wisdom is that ToS does NOT allow multiple timeframes within a scan.

That said, an idea occurred to me as I was reading your question.

It only works for two aggregation periods, and only when the criteria can be easily separated into two steps.

We can scan on a secondary aggregation within the results of a primary aggregation scan.

Eawgh6e.png

Figure 1. Note that the scan being run is a saved scan, which aggregates on a DAY timeframe. It is set to scan in the s&p 500.

ZHyjyvi.png

Figure 2. This is the second timeframe for our composite scan. It is running on 10 MINUTES. Notice that the "Scan In" field is set to the name of the first study from above.

This returns scan results true for both timeframes.

Hope that helps,
-mashume
Could you please post the think script you used for these two scans? I checked the tool box but didn't find any PSY or Concavity scan in there?
 
Any help you could provide @mashume would be very much welcome. 😊
Those are two randomly chosen (well, not random but chosen for their broad results and timeframes) saved scans. You can do the same with any two of your saved scans.

They are based on scripts I have published here on useThinkScript.com. I hesitate to post them exactly here as they were not chosen for any particular financial reason -- there is no reason to their rhyme for my example. I'd rather post something that folks have put thought into why they should be combined on multiple timeframes rather than those I used for a proof-of-concept post.

happy trading,
-mashume
 

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
306 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