Customizing Your own Formulas - The Variables and Operators
When you are in the filter menu you have the option to click on our criteria tabs add our pre-made screening variables to your personal filter sets. For example, you can click on the PRICE tab and select 'Percent from 52 week low'<20%. The actual formula for this is:
(#last#-#l365#)/(#h365#-#l365#)*100<=20.and.#l365#>0
Similarly, you can click on the TECH tab and select "DAILY gap in price over yesterdays high":
(#low#>#h1#).and.(#high#<>#low#)
As you can see, these formulas have "variables" like last, l365, low, h1, high, and so on. In addition there are logical operators like >= (greater than or equal to) and the word ".and." with 2 periods by it. Note also how there is always a # on the left and right of any variable.
With a complete list of the "variables" and "logical operators" in ChartSmart you can construct your own formulas similar to the ones above. You can then combine your formulas with some of the ChartSmart formulas to make some VERY powerful filter sets. Basically you can create formulas to draw any relationship between the variables in ChartSmart.
Before we tell you about the variables and logical operators and how to create formulas, we want to tell you that these are only the beginning of the screening capabilities in Chartsmart. You can even include in your formulas historical variables. For example, as in the above there are regular variables like l365 (the 365 day low) or close (the daily close). Similarly there are technical variables called RSI14 which is the 14 day relative strength index value for the specific security. In a regular formula you could specify that the RSI14>70 then run your filtered list. Historical variables on the other hand allow you to put a number in front of the variable corresponding to the number of trading days ago the variable applies. For example you could specify RSI14>70.AND.5RSI14<50.AND.10RSI14<50. This means the rsi today is over 70, but 5 and 10 days ago it was under 50.
Historical variables, a feature only found in Chartsmart, takes screening from a 2 dimensional level to a 3 dimensional level incorporating "time" into your formulas. Though this is a really advanced feature we wanted to let you know now so that you can see that Chartsmart is capable of sophistication beyond any other screening software. Hopefully your mind is reeling about now as to the possibilities of Chartsmart and that you may have finally found a tool that can do what you thought were the impossible. Now to figure out how to use it. Lets continue now discussing BASIC VARIABLE SCREENING. We discuss HISTORICAL VARIABLES later in the SCREENING section of our web page.
We will now create a sample formula. For example, we will specify that today the stock traded at least 3% of its total issued capitalization. You would first get the variables you require based on the information in the section that lists the screening variables in Chartsmart which are:
Todays Close - close
Issued Capitalization - issued
Todays Volume - Volume
Then you must create the formula
volume/(issued*1000)*100>=3
It is very important to remember you must put a "#" sign on the left and right of each variable in the formula
#volume#/(#issued#*1000)*100>=3.and.#issued>0
This is the final formula. Note that the issued is multiplied by 1000 because the value we record is in our database is 1/1000 of the issued. In addition we specified issued>0 to prevent any infinite values.
Let's now show you how to enter your own formula. Entering your custom formulas is done under the YOU SPECIFY tab in the filter menu where you create your custom screens. When you click on YOU SPECIFY you will see 50 rows which means you can create up to 50 "Custom Calculated Lists". Each one can be a formula you create then you can combine it with other filter criteria when you create a filter set.
For example, When you check on "Custom Calculated List 1" you will see the list get added to your list of criteria in your filter set. Then, beside the "Custom Calculated List" under the YOU SPECIFY TAB, click on the EDIT button where you can enter your formula. On the upper right you can click on CHANGE NAME if you want to change the name from Custom Calculated list 1. In order to enter the formula, simply click on CREATE FORMULA and in the WHITE box enter the formula above. For example, I have pasted the one we just created as shown in
this image
(#volume#/(#issued#*1000))*100>=3.and.#issued#>0
Note also on the bottom of the previous image there is a button called CHARTSMART FORMULA DATABASE. When I click it I get
this image. This menu is the search engine for custom formulas that we can upload to you. For example, if you require a specific formula and we help you create it, we can use this menu to upload formulas so that all subscribers can view them. We will discuss a bit more about this menu later. You will also see on
the previous image
that there is a button called UPDATE FORMULA DATABASE. This allows users to update the Formula Database when we add new formulas.
Your screening formula is complete. You can now see the filter set
which includes both the TSX Venture and TSX exchanges, as well as my custom calculated list #1. You can now go to the main filter menu and click on RUN FILTERED LIST and you will get a list of equities on those 2 exchanges where they traded at least 3% of their total issued capitalization on the current day.
At this point you should be able to construct your own formulas. The following will give you a little more information on operators then we will go through the Chartsmart Variables that you can use in your formulas in Lesson 4. Remember to start simple. The best example might be just to try
#CLOSE#>10
then run a screen and see it work for you. Then make the custom formula more complex. ChartSmart includes over 100 criteria variables such as:
1) basic variables like high,low,close,volume,open
2) indicator variables like sma10, rsi14, adx1414
3) fundamentals like eps, epsq1, div
4) fundamentals ratios
5) special variables like security sector, type, name, phone
OTHER NOTES AND OPERATORS
1) Whenever creating a formula the '#' sign must be on both sides of the variable. For example,#EXP25P#2) If you have a problem with a custom formula you can email us exactly what you have tried and we will try to resolve your any problem you may be experiencing.
3) When using parenthesis you must use the round ones "(" or ")" and they must always balance in a formula.
4) Always remember that the variables V1, V2, V3, V4, V50, V15 and the ISSUED are one one-thousandth of their real value. In the formula you need to multiply them by 1000 for an accurate figure.
5) You can use the signs:
> (Greater than)
<(Less than)
>= (Greater than or equal to)
<= (Less than or equal to)
.and. (be sure to note the periods on each side)
.or. (be sure to note the periods on each side)
OTHER MORE ADVANCED OPERATORS
There are also a number of other statistical operators that are available. Here are some samples that show them being used and what they mean:
max(#wkh0#,#wkh1#,#wkh2#,#wkh3#)
would give the maximum value of the highs for weeks 1 through 3
min(#close#,#c1#,#c2#,#c3#)
gives the minimum of the last 3 days closes
sqrt(#volume#)
square root of the volume
You may also wish to do some manipulations to characters. For example, you can apply screens to the following variables:
at('GOLD',upper(#name#))>0
Gives all companies with gold in their name
If you have any questions do not hesitate to contact us at info@chartsmart.com