Print Page | Close Window

Scan

Printed From: BullCharts Forum
Category: BullCharts
Forum Name: BullScript
Forum Discription: Technical discussion related specifically to the BullScript programming language.
URL: http://www.bullcharts.com.au/forum/forum_posts.asp?TID=421
Printed Date: 18 Apr 2025 at 5:45pm
Software Version: Web Wiz Forums 9.69 - http://www.webwizforums.com


Topic: Scan
Posted By: Vito
Subject: Scan
Date Posted: 24 May 2007 at 6:27pm
Hi,
   Is there any one out there can help me to write a a simple scan. What I want it to do is to tell me which stocks had a trading range today which is less that 51% of the previous days range.


Regards
vito



Replies:
Posted By: investforwealth
Date Posted: 25 May 2007 at 1:07am

I've only been a BullCharts user for about 3 or 4 weeks, so this probably isn't the most mindblowing bullscript you've ever seen, but it should do the trick...

[name="Trading Range Scan"]
[author="investforwealth"]

[citation="BullCharts Forum:  http://www.bullchart.com.au/Forum/forum_posts.asp?TID=421 - http://www.bullchart.com.au/Forum/forum_posts.asp?TID=421 in response to a request by Vito 24/05/2007"]

[description="This scan calculates the trading range for the current day and compares it to the trading range for the previous day. It returns any security where the current day's range is less than 51% of the previous day's range"]

{Setup Ranges and Run Filter}

RangeToday := High - Low;
RangeYesterday := Hist(High,1) - Hist(Low,1);
RangeChange:= RangeToday / RangeYesterday;
RangeChange < 0.51


[name="Today's Range"]
RangeToday;

[name="Yesterday's Range"]
RangeYesterday;

[name="Range Change"]
RangeChange;

I've attached the scan as a file for your convenience. 

uploads/investforwealth/2007-05-25_010305_Trading_Range.sc - 2007-05-25_010305_Trading_Range.sc

It is probably more elegant to create an indicator that provides a marker and run a scan using the indicator - this allows you to use the GUI to set the percentage change you're looking for and to also easily add further scan criteria, such as a minimum volume or share price.  The indicator and the second scan are also attached, take your pick which you use. 

uploads/investforwealth/2007-05-25_010331_RangeDiff.bss - 2007-05-25_010331_RangeDiff.bss

uploads/investforwealth/2007-05-25_010343_Trading_Range_2.sc - 2007-05-25_010343_Trading_Range_2.sc

Let me know if I can be of any further help.



Posted By: Vito
Date Posted: 28 May 2007 at 4:01pm
Thankyou for your help.



Print Page | Close Window

Bulletin Board Software by Web Wiz Forums® version 9.69 - http://www.webwizforums.com
Copyright ©2001-2010 Web Wiz - http://www.webwiz.co.uk