50% retracement of the previous daily candle

leedagr8

New member
Hello I'm a strat trader. I saw theirs a huge forum around the strat in here that's been really helpful, however I like to trade stocks with potential outside day setups, or stocks that are at the previous day 50% level. I have code that can scan for the previous days High, Low, and 50% mark. But I want to be able to customize it more so that my watchlist will refresh when the following condition are true.

Plot scan = (if Low < Low[1] && last >= previousDailyFiftyPercentLevel) or ( if high > high[1] && last >= previousDailyFiftyPercentLevel);

If possible ( I know thinkscript has a hard time with different aggregation periods) it'll be nice to see on the 5min chart if the last price has touched the previous day's 50% level and closed above it or below it.
 
Solution
Hello I'm a strat trader. I saw theirs a huge forum around the strat in here that's been really helpful, however I like to trade stocks with potential outside day setups, or stocks that are at the previous day 50% level. I have code that can scan for the previous days High, Low, and 50% mark. But I want to be able to customize it more so that my watchlist will refresh when the following condition are true.

Plot scan = (if Low < Low[1] && last >= previousDailyFiftyPercentLevel) or ( if high > high[1] && last >= previousDailyFiftyPercentLevel);

If possible ( I know thinkscript has a hard time with different aggregation periods) it'll be nice to see on the 5min chart if the last price has touched the previous day's 50% level and...
Hello I'm a strat trader. I saw theirs a huge forum around the strat in here that's been really helpful, however I like to trade stocks with potential outside day setups, or stocks that are at the previous day 50% level. I have code that can scan for the previous days High, Low, and 50% mark. But I want to be able to customize it more so that my watchlist will refresh when the following condition are true.

Plot scan = (if Low < Low[1] && last >= previousDailyFiftyPercentLevel) or ( if high > high[1] && last >= previousDailyFiftyPercentLevel);

If possible ( I know thinkscript has a hard time with different aggregation periods) it'll be nice to see on the 5min chart if the last price has touched the previous day's 50% level and closed above it or below it.

Hi, this might be what you're looking for -- I don't trade the strat so let me know if I'm missing something, but the following code will grab the previous day's high, low, and halfway point. Then I just added your scan plot and adjusted it to Thinkscript format. You should be able to just plug this into a watchlist from here.

Code:
def PHOD = high(period = aggregationperiod.day)[1];
def PLOD = low(period = aggregationperiod.day)[1];

def previousDailyFiftyPercentLevel = (phod + plod) / 2;

Plot scan = ( Low < Low[1] and close >= previousDailyFiftyPercentLevel) or (  high > high[1] and close >= previousDailyFiftyPercentLevel);
 
Solution
Hello I'm a strat trader. I saw theirs a huge forum around the strat in here that's been really helpful, however I like to trade stocks with potential outside day setups, or stocks that are at the previous day 50% level. I have code that can scan for the previous days High, Low, and 50% mark. But I want to be able to customize it more so that my watchlist will refresh when the following condition are true.

Plot scan = (if Low < Low[1] && last >= previousDailyFiftyPercentLevel) or ( if high > high[1] && last >= previousDailyFiftyPercentLevel);

If possible ( I know thinkscript has a hard time with different aggregation periods) it'll be nice to see on the 5min chart if the last price has touched the previous day's 50% level and closed above it or below it.
Hi everyone can someone help me for the reverse of this scanner. Thank you so much
 

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
287 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