Catching signal at market open

epete

Member
I have a strategy that will signal a change in trend by plotting an up arrow on the chart, indicating an uptrend and a down arrow, indicating a downtrend. Sometimes those signals happen before the market opens. After the market opens the trend could continue in an upward momentum. Any of a dozen trending indicators would be an example. Since I only trade during market hours - is there a way to detect the stock is in this "upward trend" at market open? In essence, the arrow signal has long since past, but I'd still like to catch the momentum at market open. Here's an example of a chart based on a CANDLE_TREND chart. The white arrow is the signal the trend has changed. I'd like to catch that at market open. The images on the right is the effect I'd like to achieve. Thanks
Catching-a-signal-at-open.jpg
Trend-Trader-Pro-2021-10-10-3-28-21.jpg
 

Attachments

  • Catching-a-signal-at-open.jpg
    Catching-a-signal-at-open.jpg
    4 KB · Views: 141
Last edited:
Solution
Here's a variation of the above question. I have signal arrows for up trend and down trend. Those are shown historically on the chart. Can I:
1. determine the time of the last up arrow
2. determine the time of the last down arrow
3. subtract the two, and therefore
4. know if the most recent signal was trending up - or trending down?
Trending-Up-Down-arrows-2021-10-11-0-24-26.jpg

you can save the barnumber when a condition happens, then compare the 2 barnumbers.

Code:
def up = ... your  true/false trigger of the up arrow
def down = ...  your  true/false trigger of the down arrow

def upbn = if barnumber() == 1 then 0 else if up == 1 then barnumber() else upbn[1];
def downbn = if barnumber() == 1 then 0 else if down == 1 then barnumber() else downbn[1];

def...
I have a strategy that will signal a change in trend by plotting an up arrow on the chart, indicating an uptrend and a down arrow, indicating a downtrend. Sometimes those signals happen before the market opens. After the market opens the trend could continue in an upward momentum. Any of a dozen trending indicators would be an example. Since I only trade during market hours - is there a way to detect the stock is in this "upward trend" at market open? In essence, the arrow signal has long since past, but I'd still like to catch the momentum at market open. Here's an example of a chart based on a CANDLE_TREND chart. The white arrow is the signal the trend has changed. I'd like to catch that at market open. Thanks
Catching-a-signal-at-open.jpg
Interesting, can you please post the "signal" or indicator that does this? Thanks.
 

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

Here's a variation of the above question. I have signal arrows for up trend and down trend. Those are shown historically on the chart. Can I:
1. determine the time of the last up arrow
2. determine the time of the last down arrow
3. subtract the two, and therefore
4. know if the most recent signal was trending up - or trending down?
Trending-Up-Down-arrows-2021-10-11-0-24-26.jpg
 
Here's a variation of the above question. I have signal arrows for up trend and down trend. Those are shown historically on the chart. Can I:
1. determine the time of the last up arrow
2. determine the time of the last down arrow
3. subtract the two, and therefore
4. know if the most recent signal was trending up - or trending down?
Trending-Up-Down-arrows-2021-10-11-0-24-26.jpg
You could set a condition (if statement) that scans for the up/down area within x number of candles….
 
I cannot post the indicator I use since it is commercial (TrendTraderPro); however there are several trending indicators one could review, including the Heiken_Ashi based one found here:
https://usethinkscript.com/threads/...-for-thinkorswim-users.2016/page-4#post-57083

Or, another one based on the standard TD Ameritrade HullMovingAvg:
https://usethinkscript.com/threads/hull-moving-average-for-thinkorswim.947/#post-15827
Interesting, I also have TrendTraderPro indicator, let me know which TimeFrame and setting you're using so that I can help you with the scanner. I have also noticed that... in some cases 30 or 15 min before the bell the trend will begin going up and if it's strong enough it will continue soaring... but as always, it's a pattern that it's seen in occasionally ... no strategy is 100% effective. I have also seen stocks with good up-trending momentum in the premarket and then just after the bell they sell off and gap down... so it depends, the market is uncertain, you cannot predict it but you can set your rules to trade, and if they meet then trigger.
 
Here's a variation of the above question. I have signal arrows for up trend and down trend. Those are shown historically on the chart. Can I:
1. determine the time of the last up arrow
2. determine the time of the last down arrow
3. subtract the two, and therefore
4. know if the most recent signal was trending up - or trending down?
Trending-Up-Down-arrows-2021-10-11-0-24-26.jpg

you can save the barnumber when a condition happens, then compare the 2 barnumbers.

Code:
def up = ... your  true/false trigger of the up arrow
def down = ...  your  true/false trigger of the down arrow

def upbn = if barnumber() == 1 then 0 else if up == 1 then barnumber() else upbn[1];
def downbn = if barnumber() == 1 then 0 else if down == 1 then barnumber() else downbn[1];

def isup_recent = (up > down);
addlabel(1, "recent was " + (if isup_recent then "up" else "down"), (if isup_recent then color.green else color.red) );
 
Solution

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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