Training Zone Banner

 Tutorial 37 – Data Mining using ShareScript Crosses

In ShareScope Plus and ShareScope Pro you can now Data Mine for a variety of technical indicator crosses more easily by using the Cross Finder ShareScript.

This single ShareScript file will currently allow you to more easily create filters to find the following crosses:

  • Price crossing above/below Moving Average
  • Golden and Dead crosses (two Moving Averages crossing
  • MACD crossovers
  • ADX crossovers
  • Momentum above/below specified levels

In this tutorial:

Adding the Cross Finder ShareScript criterion
Setting the criteria range values
Creating multiple filters
Using Cross Finder in Alarms

 Adding the Cross Finder ShareScript criterion

In Data Mining, create a new filter (see Tutorial 6 – Basic Data Mining if you are not sure how to do this).

Click on the Add Criterion button and select ShareScript from the Data Mining Wizard. You can either click in the radio button and then click on Next. Or double click on ShareScript to select it and move to the next step in the wizard.

Now click the Select ShareScript file button.

The following dialog will be displayed. You may be able to see the Cross Finder script already (outlined below in blue), however first you should make sure you have the most recent version of it.

ShareScope’s ShareScript experts will make changes to default ShareScript files from time to time – any updates are uploaded to the ShareScript Library. To access the Library, click on the Script Library button (outlined in red).

In the Library, locate the Cross Finder script in the Columns section, highlight it and click on the Download & Install button. If prompted, overwrite your existing script if you are sure you have not already made any changes to it that you wish to keep.

Now that you have the latest version of the Cross Finder script, you can select the Cross Finder from the Add ShareScript Criterion dialog and click on OK.

The CrossFinder script will show as selected, so click on Finish on the Data Mining Wizard.

The dialog shown below will appear.

From the first drop-down list you can select the type of cross you want to Data Mine for. Note that all options have a cross above and a cross below option. You can only select one option at a time, but you can add the script multiple times to combine different cross-overs.

The second drop-down list allows you to specify the graph time periods to use – either Daily, Weekly or Monthly data.

Data Mining is best used with end-of-day prices. The option to Include latest intraday price is included so that you can use this same script for intraday alarms. See the Using Cross Finder in Alarms section below for more information on this.

Once you’ve selected the type of cross-over and graph time to use, click on Next to enter the parameters you wish to use to calculate the technical indicator you have selected. In the example below, the ADX above level cross was selected, and the settings have been edited for a 14 day ADX to rise above 30.

Click on OK to save your settings and add the criterion to the filter.

 Setting the criteria range values

For all of the cross-overs available on the Cross Finder script, the criteria will only ever have a minimum value of 0 and a maximum value of 1.

Shares that have returned a 0 have not met the criteria (no cross-over has occurred); shares that have returned a 1 have crossed according to the settings you have specified for the criteria. This is regardless of whether you select a ‘cross above’ or a ‘cross below’ – if a cross has occurred in either direction, the result you are looking for will always be 1.

That being the case, you now want to set the range on the criterion to be from 1 to 1 (as shown below) to ensure that the shares listed have all met the cross-over you are looking for.


 Creating multiple filters

As mentioned above, you can add the same or other scripts to the same filter as many times as you like. If, however you want to find shares where the price crosses above a Moving Average, and also find shares where the price has crossed below the same Moving Average you will need to set up two separate filters. See the examples below of how the two filters may look:

Notice that there is no visible difference between the two filters, aside from the name and note – the criteria look the same and the ranges are set the same. The only way to be really sure about what the criterion is filtering for is to edit it and you can do so quickly by double clicking where it says Script: CrossFinder:


 Using Cross Finder in Alarms

If you use historical graphs in ShareScope and include the latest intraday prices, you may want to be alerted for crosses that occur during the trading day with the latest mid price. You can now do this very easily using the same Cross Finder ShareScript file.

To set the alarm, go to the Edit menu and select Set an intraday alarm for [share]. Click on ShareScript, then click on Next.

Click on the Choose Script button and select the script from the ShareScript dialog. When selecting your cross type, ensure you also tick the option to Include latest intraday price.

Continue adding the settings for the indicator you are using in the script and then continue to add the intraday alarm as you would any other alarm.

The alarm can then be reviewed, edited or deleted within the Alarms list.

Remember if you have any trouble finding or using any of these features, please don’t hesitate to call our Customer Support team on 020 7749 8504. They will be delighted to help.