Editing the Source Code of Studies

Note             You can only edit the source code of custom studies that you have created yourself. To change an original study, you can save a copy of the study under a different name (see below) and then adapt the source code of the copied study to your needs.

Some changes to a study can only be done by changing its source code on the Source Code tab of the Study Editor.

In this section, you will only learn here how to use the Study Editor to edit a study. For more information about the TeleTrader Language, you can find in-depth explanations in different sections:

▫       If you are new to editing source code, we provide several examples with step-by-step instructions in the section Creating Custom Studies.

▫       If you are already familiar with the TeleTrader Language, you might still want to look up specific commands in the Language Reference.

To edit the source code of a study

▪       On the Tools menu, click Study Editor.

▪       In the study list on the left side, click on the study.

▪       On the Source Code tab, change the code of the study. For step-by-step examples, see Creating Custom Studies.

▪       Click Check Syntax to check if the changes to the code are in compliance with the TeleTrader Language syntax.

Note             If the syntax is not correct, you can still save the study to finish working on it later. It is not recommended to try to use it in a chart or price page, though. For an overview of possible error messages, see Error Messages.

To save the copy of a study under a different name as a new study

▪       In the study list on the left side, click on the study.

▪       On the File menu of the Study Editor dialog, click Save a Copy.

▪       In the Name field, enter the name of the study as it should appear in the study list (for example in the Insert Study dialog).

▪       In the Function Name field, enter the name of the function used to calculate the study. Pay attention to the Naming Conventions.

To save all edited studies

▪       In the Study Editor, click Save All.

Note             A backup file of your custom studies named UserStudies.bak is created automatically as soon as you click Save All. If you want to only save the changes that you did to one study, without saving the changes that you did to other studies, click Save on the File menu of the Study Editor.