We can manage scripts in the PowerLanguage .NET Editor with the menu items as well as with the toolbar. But what are the keyboard shortcuts so we can efficiently work with this code editor?

The PowerLanguage .NET Editor in MultiCharts .NET

The PowerLanguage .NET Editor is the primary tool for creating and editing indicators, trading strategies, and functions in MultiCharts .NET (MultiCharts, 2014). While we can also edit scripts in other programs (like Visual Studio), certain actions (like removing, importing, and exporting scripts) are only possible in the PowerLanguage .NET Editor.

Luckily, this MultiCharts .NET component has several keyboard shortcuts so we can work with this code editor efficiently. In the PowerLanguage .NET Editor we’ll often see the study term. Studies is the name that MultiCharts .NET uses for indicators, signals (which are trading strategies), and functions (MultiCharts Wiki, 2013). Since these are more commonly known as scripts, we use that term below.

PowerLanguage .NET Editor shortcuts for menu items

Working with the menu items in the PowerLanguage .NET Editor is done efficiently with the following keyboard shortcuts:

Shortcut Effect
Ctrl + O Displays the ‘Open Study’ window.
Ctrl + I Opens the ‘Import Study’ window.
Ctrl + E Opens the ‘Export Study’ window.
F7 Compiles all changed (uncompiled) scripts.
Ctrl + F7 Forces compiling all scripts.
Alt + F Opens the ‘File’ menu.
Alt + E Opens the ‘Edit’ menu.
Alt + V Opens the ‘View’ menu.
Alt + V, T Enables or disables the toolbar.
Alt + V, S Enables or disables the status bar.
Alt + V, E Enables or disables the ‘Errors’ window.
Alt + V, N Enables or disables the ‘Studies’ window.
Alt + V, O Enables or disables the ‘Output’ window.
Alt + C Opens the ‘Compile’ menu.
Alt + W Opens the ‘Windows’ menu.
Alt + W, 1 through 9 Switches to one of the open scripts.
Alt + W, L Closes all open scripts.
Alt + W, W Opens the ‘Select Window’ window to switch to another, open script. This window is available when there are more than 9 open windows.
Alt + T Opens the ‘Tool’ menu.
Alt + T, E Opens the ‘Editor Options’ window.
Alt + H Opens the ‘Help’ menu.
Alt + H, P Opens the ‘PowerLanguage .NET Help’ file.
Alrt + X or Alt + F4 Closes the PowerLanguage .NET Editor.

Editing a MultiCharts .NET script with keyboard shortcuts

These keyboard shortcuts are available when editing a script:

Shortcut Effect
Ctrl + A Selects all code.
Ctrl + Arrow up or Ctrl + Arrow down Scrolls the editor window that displays the script’s code up or down, respectively.
Ctrl + Backspace or Ctrl + Delete Removes the code element to the left or right of the text cursor, respectively.
Ctrl + C Copies the selected code.
Ctrl + Enter Inserts a new, empty line above the line with the text cursor.
Ctrl + F Opens the ‘Find/Replace’ window.
Ctrl + F4 Closes the script that’s currently being edited.
Ctrl + F6 or Ctrl + Shift + F6 Cycles through the open scripts.
Ctrl + L Removes the line highlighted by the text cursor and places it in the computer’s memory. The line can then be copied elsewhere with Ctrl + V.
Ctrl + Numeric keypad add or Ctrl + Numeric keypad subtract Ctrl with + on the keypad selects different parts of the script depending on how often this shortcut is pressed: one press selects the current line, two presses selects the current method, three presses the current class, and pressing four times selects all code in the current namespace. This shortcut’s behaviour is reversed by Ctrl + Numeric keypad subtract.
Ctrl + P Opens the ‘Print’ window.
Ctrl + S Saves the current script.
Ctrl + Shift + Enter Insert a new, blank line below the current line.
Ctrl + Shift + F10 Opens the right-click context menu.
Ctrl + Shift + T Moves the code element highlighted by the text cursor one step to the right with each press.
Ctrl + Shift + Tab Go to the previous, open script (this shortcut is the reverse of Ctrl + Tab).
Ctrl + Shift + U Transforms either the selected text or the character to the right of the text cursor to uppercase.
Ctrl + Shift + W Jumps through the line (from left to right), selecting each code element in turns. Stops at the end of the line.
Ctrl + Space Opens the IntelliSense feature for intelligent code completion.
Ctrl + T Moves the character to the left of the text cursor one step to the right.
Ctrl + Tab Cycles through all the open script files.
Ctrl + U Moves the text cursor one step to the right, transforming all passed characters to lowercase.
Ctrl + V Paste.
Ctrl + X Cut.
Ctrl + Y Redo the last action.
Ctrl + Z Undo the last action.
Delete Removes the selected code.
F1 Displays the contents of the help file when the text cursor is placed on a code element that has a help entry in the PowerLanguage .NET Editor help file.
Tab or Shift + Tab Increases or decreases the indentation of the current line, respectively.

Shortcuts for the ‘Open Study’ window

The ‘Open Study’ window for opening MultiCharts .NET scripts has the following keyboard shortcuts:

Shortcut Effect
Any letter(s) Moves the row selector to the first script starting with that letter(s). Pressing the same letter repeatedly causes the row selector to cycle through all scripts starting with that letter.
Arrow up, arrow down Move the row selector up or down with one script.
Ctrl + A Select all scripts.
Ctrl (held down) + Left mouse button Selects multiple scripts at once.
Delete Brings up the confirmation window for deleting the selected script.
Enter Opens the selected script(s).
Esc Close the ‘Open Study’ window.
Shift (held down) + Left mouse button Selects all scripts between the first and second click.

Shortcuts for the ‘Import Studies’ window

The following keyboard shortcuts are available when importing scripts in the PowerLanguage .NET Editor, after opening the PowerLanguage .NET Archive file with the file browser window:

Shortcut Effect
Any letter(s) Moves the row selector to the first script starting with that or those letters. When the same letter is pressed repeatedly, the row selector cycles through the scripts that have a name starting with that letter.
Arrow up or arrow down Move the row selector up or down with one script.
Ctrl (held down) + Left mouse button Selects multiple scripts at once.
Enter Imports the scripts with the enabled checkbox ( ) before their name.
Esc Closes the ‘Import Studies’ window.
Shift (held down) + Left mouse button Selects all scripts between the first and second click.
Space or double-clicking on a script Toggle the script’s checkbox to checked or unchecked.

Keyboard shortcuts for the ‘Export Studies’ window

The following keyboard shortcuts are available when exporting scripts from the PowerLanguage .NET Editor:

Shortcut Effect
Any letter(s) Moves the row selector to the first script starting with that letter(s). When the same letter is pressed repeatedly, the row selector cycles through all scripts that begin with that letter.
Arrow up or arrow down Move the row selector up or down one script.
Ctrl (held down) + Left mouse button Selects each of the scripts that’s clicked on.
Enter Exports the scripts that have their checkbox set to enabled ( ).
Esc Closes the ‘Export Studies’ window.
Shift (held down) + Left mouse button Selects all scripts between the first and second click.
Space or double-clicking on a script Toggles the script’s checkbox to checked or unchecked.

Shortcuts for the ‘Studies’ navigator window

The ‘Studies’ window panel provides easy access to the scripts in the PowerLanguage .NET Editor. It has the following shortcuts:

Shortcut Effect
Any letter(s) Selects the first script that starts with that letter(s) from the currently open folders in the ‘Studies’ window. Pressing the same letter repeatedly causes the selector to cycle through all scripts starting with that letter.
Arrow up or arrow down Moves the selector up or down, relative to the currently selected script.
Arrow left or arrow right When a folder is selected, arrow left collapses it while arrow right expands it, respectively.
Ctrl (held down) + Left mouse button Selects each of the scripts that’s clicked on.
Delete Shows the ‘confirm removal window’ before removing the selected script(s).
Double-click on a script Opens the script in the code editor.
F2 Renames the selected folder. Doesn’t work when a script is selected.
Shift (held down) + Left mouse button Selects all scripts between the first and second click.

Shortcut for the ‘Errors’ window

The ‘Errors’ window panel, that provides an overview of all erroneous scripts, has the following keyboard shortcuts:

Shortcut Effect
Any letter(s) Highlights the error message that begins with that letter(s).
Arrow up or arrow down Highlights the error above or below the currently selected error.
Ctrl + A Select all errors in the ‘Errors’ window.
Ctrl + C Copies the selected error to the Windows clipboard.
Ctrl + Shift + F10 Brings up the right-click context menu when the ‘Errors’ window is selected.
Double-click Goes to the error location. It will open the faulty script when it’s currently closed.

See examining the menu items and exploring the toolbar to learn more about working with the PowerLanguage .NET Editor. The editor’s options are discussed in the syntax highlighting options of the PowerLanguage .NET Editor.

Summary

Several keyboard shortcuts in the PowerLanguage .NET Editor make working with this program easier. With shortcuts we can efficiently access the menu items or program in the code editor window. Shortcuts can also be used in the ‘Open Study’, ‘Import Studies’, ‘Export Studies’ windows, as well as in the ‘Studies’ and ‘Errors’ window panels.


References

MultiCharts (2014). MultiCharts .NET Programming Guide (version 1.1). Retrieved from http://www.multicharts.com/downloads/MultiCharts.NET-ProgrammingGuide-v1.1.pdf

MultiCharts Wiki (2013, May 6). Using Studies (PowerLanguage Editor). Retrieved on July 16, 2015, from https://www.multicharts.com/trading-software/index.php/Using_Studies_%28PowerLanguage_Editor%29