New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.
how do I write a scan script for Maximum range over 30 days starting today
Hello I would like to write a scan script for "Maximum range over 30 days starting today is greater than maximum range over 15 days starting today". This scan is from trend trading for a living. I read the introduction to advanced scanning but could not find the answer. Thank you for your help
0
Comments
-
You need to use the max( ) and min( ) functions.
The maximum range for a period of time is the difference between the highest high in that period and the lowest low in that period. So if the period you are looking at is x bars long, the range for that period would be max(x, high) - min(x, low).
0 -
Thanks. so screen for "Maximum range over 30 days starting today is greater than maximum range over 15 days starting today" the script would be [max(30, high) - min(30, low) > max(15, high) - min(15, low)]?0
-
great. thanks a bunch!!!0
Categories
- All Categories
- 2.3K StockCharts
- 395 SharpCharts
- 146 Other Charting Tools
- 69 Saved Charts and ChartLists
- 1.5K Scanning
- 73 Data Issues
- 177 Other StockCharts Questions
- 218 Technical Analysis
- 155 Using Technical Analysis
- 2 InterMarket and International
- 19 Market and Breadth Indicators
- 42 Market Analysis
- 109 Trading
- 109 Trading Strategies
- 163 S.C.A.N the StockCharts Answer Network forum
- 65 Using this StockCharts Answer Network forum
- 98 s.c.a.n. archives
- 5 Off-Topic
- 6 The Cogitation & Rumination Emporium
- Forum Test Area