cRange question

mike_usa

New member
VIP
I found this filter as a study on one of the scan
def cRange = (close - low) / (high - low) * 100;
def filter_cRange = if cRange > 40 then yes else no;
Can any one here explain explain what this filter will do?
 
Solution
I found this filter as a study on one of the scan
def cRange = (close - low) / (high - low) * 100;
def filter_cRange = if cRange > 40 then yes else no;
Can any one here explain explain what this filter will do?

with no offsets being used, it is comparing the close to the price range of the current candle. as the close gets closer to the high, the % will get bigger.
The stochastic indicator is a momentum indicator developed by George C. Lane in the 1950s, which shows the position of the most recent closing price relative to the previous high-low range. The indicator measures momentum by comparing the closing price with the previous trading range over a specific period of time.

The stochastic indicator is calculated using the following formula:

%K = (Most Recent Closing Price - Lowest Low) / (Highest High - Lowest Low) × 100

%D = 3-day SMA of %K

Lowest Low = lowest low of the specified time period

Highest High = highest high of the specified time period
 

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

I found this filter as a study on one of the scan
def cRange = (close - low) / (high - low) * 100;
def filter_cRange = if cRange > 40 then yes else no;
Can any one here explain explain what this filter will do?

with no offsets being used, it is comparing the close to the price range of the current candle. as the close gets closer to the high, the % will get bigger.
 
Solution
thank you for the explanation , so what do you think the beneficial of adding this filter to the scan with aggregation being daily
i have no opinion on why to use something. you will have to experiment with variations of things to find what works for you.
i don't scan, i look at a short list of some S-P100 companies. ( they have volume and a little volatility)
 
thank you for the explanation , so what do you think the beneficial of adding this filter to the scan with aggregation being daily
As @scott69 pointed out this is basically the definition of the Stochastic K, a built-in ToS study.
Recommend you put it on your chart. Nothing beats personal experience ;) The only way you will know what works best for you is to play with the settings and see how the indicator line up w/ your strategy and with your other indicators. To determine if this indicator brings value, analyze it over different timeframes, across history and with multiple instruments.
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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