Changes

Jump to navigation Jump to search

Editing Study Scripts

6,006 bytes added, 18:44, 22 February 2012
no edit summary
Studies are PowerLanguage scripts, expressing trading rules in a systematic and logical way that can be executed by a computer. Scripts consist of at least one, but usually more, statements. Each statement is a complete instruction.
 
To learn more, see [[<span style="color: red;">'''LINK'''</span>/04_PL/41-0006_Elements.html name=""; |PowerLanguage Elements]]
 
PowerLanguage scripts can be easily created and edited by using the PowerLanguage Editor. PowerLanguage Editor includes many advanced text editing features, built-in PowerLanguage keyword reference, and a keyword hint feature.
 
Before a study can be applied to a chart, the study's script must be [[<span style="color: red;">'''LINK'''</span>/03_PLE/31-0103_WorkingStudies.html name="4"; |compiled]].
 
The code is compiled directly in the PowerLanguage editor.
 
The script of a study can be [[<span style="color: red;">'''LINK'''</span>/03_PLE/31-0103_WorkingStudies.html name="5"; |password protected]]; script of a protected study can not be viewed without the password.
 
<br>
== Text Editing Features ==
 
The following text editing features are available:
<br>
=== Undoing and Re-doing Changes ===
 
Changes to the script that were made since the editor was open or the study compiled can be undone; "undone" changes can be redone again.
 
<br>Changes can be undone by one of the following methods:
 
* Clicking the '''Undo''' http://www.multicharts.com/img/wiki/toolbar/PLE/05_Undo.gif icon on the toolbar; or:
* Using the Ctrl+Z keyboard shortcut, or:
* Selecting '''Edit''' in the main menu, and clicking '''Undo'''.
 
<br>Changes can be redone by one of the following methods:
 
* Clicking the '''Redo''' http://www.multicharts.com/img/wiki/toolbar/PLE/06_Redo.gif icon on the toolbar; or:
* Using the Ctrl+Y keyboard shortcut, or:
* Selecting '''Edit''' in the main menu, and clicking '''Redo'''.
 
<br>
<div style="background-color: #E3FBE5;">Note: Changes to the script made before the study was compiled cannot be undone.</DIV>
 
<br>
=== Copying, Cutting and Pasting Code ===
 
Text can be copied, cut, and pasted within the PowerLanguage Editor and between the editor and other programs.
 
<br>Text can be copied by one of the following methods:
 
* Using the Ctrl+C keyboard shortcut; or:
* Selecting '''Edit''' in the main menu, and clicking '''Copy'''.
 
<br>Text can be cut by one of the following methods:
 
* Using the Ctrl+X keyboard shortcut; or:
* Selecting '''Edit''' in the main menu, and clicking '''Cut'''.
 
<br>Text can be pasted by one of the following methods:
 
* Using the Ctrl+V keyboard shortcut; or:
* Selecting '''Edit''' in the main menu, and clicking '''Paste'''.
 
<br>
== Finding Text ==
 
To find text:
 
# Open the '''Find''' window by clicking the '''Find''' http://www.multicharts.com/img/wiki/toolbar/PLE/07_Find.gif icon on the toolbar, by using the Ctrl+F keyboard shortcut, or by selecting '''Edit''' on the main menu and clicking '''Find'''.
# Enter the text to be found into the '''Find what''' box.
# Select the '''Match whole word only''' check box to find whole words only.
# Check the '''Match case''' check box to make the search case-sensitive.
# In the '''Direction''' section, choose '''Up''' or '''Down''' to select the search direction.
# Click '''Find Next''' to begin the search or to find the next instance of the text.
 
<br>
== Replacing Text ==
 
To replace text:
 
# Open the '''Replace''' window by clicking the '''Replace''' http://www.multicharts.com/img/wiki/toolbar/PLE/08_Replace.gif icon on the toolbar, by using the Ctrl+H keyboard shortcut, or by selecting '''Edit''' on the main menu and clicking '''Replace'''.
# Enter the text to be found and replaced into the '''Find what''' box.
# Enter the replacement text into the '''Replace with''' box.
# Select the '''Match whole word only''' check box to find whole words only.
# Check the '''Match case''' check box to make the search case-sensitive.
# In the '''Direction''' section, choose '''Up''' or '''Down''' to select the search direction.
# Click '''Find Next''' to begin the search or to find the next instance of the text. Once an instance of the text to be replaced is found, the instance is highlighted.
# Click '''Replace''' to replace the highlighted instance of the text.
# Click '''Replace All''' to replace all instances of the text in the current study window.
 
<br>
== Compiling Scripts ==
 
Before a study can be applied to a chart, the study's script must be compiled. In process of compilation, the correctness of code in the script is verified. If any errors are found, the compilation process stops, and the error is highlighted. The results of the compilation, and errors if any, are displayed under the '''Build''' tab in the lower panel.
 
# To compile the script in the active window: Click the '''Compile''' http://www.multicharts.com/img/wiki/toolbar/PLE/12_Compile.gif toolbar icon, press the F3 key, or select '''Compile''' in the main menu and click '''Compile Study Name'''.
# To compile scripts of all opened studies: Select '''Compile''' in the main menu and click '''All Opened''', or use the Ctrl+Shift+F2 keyboard shortcut.
# To compile any uncompiled scripts of all open studies: Select '''Compile''' in the main menu and click '''All Uncompiled'''.
# To compile all scripts of all studies, stored on the computer: Select '''Compile''' in the main menu and click '''All Studies'''.
# To compile indicators and signals only: Select '''Compile''' in the main menu and click '''All Indicators and Signals Only'''.
 
<br>
== Protecting Studies ==
 
The script of a study can be password protected; script of a protected study can not be viewed without the password.
 
To protect a study:
 
# Select '''Tools''' in the main menu, and click '''Protect Study'''.
# In the '''Password Selection''' dialog box that appears, enter a password and click '''OK'''.
# Reenter the password for confirmation, and click '''OK''' to password-protect the study's script.
<br>
 
[[Category:PowerLanguage Editor]]

Navigation menu