With the PowerLanguage .NET Editor we make and edit MultiCharts .NET scripts, making this code editor a program we’ll use often. But how can we customise the layout of this program to our liking?

Writing MultiCharts .NET code in the PowerLanguage .NET Editor

Indicators, signals (meaning, strategies), and functions are created in the PowerLanguage .NET Editor (MultiCharts, 2014), a basic IDE (Integrated Development Environment) for developing MultiCharts .NET scripts.

While we can also edit a script’s content in other programs (like Visual Studio), things like importing and exporting scripts, removing scripts, and creating indicators and coding strategies are only possible in the PowerLanguage .NET Editor. That makes customising the editor’s appearance to our preferences something that makes working with it easier.

The PowerLanguage .NET Editor has multiple windows that do everything that’s not directly related to writing code, like browsing scripts (the Studies window), exploring help topics (the Help window), and reading text in the Output window that’s generated by the Output.WriteLine() and Output.Write() methods (PowerLanguage .NET Help, n.d.).

We can adjust the viewing and editing space in the editor by arranging these windows, which are called window panes or panels (Sempf, Sphar, & Davis, 2010) or simply windows (Liberty & MacDonald, 2009; Microsoft Developer Network, n.d.). They work just like in Visual Studio and allow the PowerLanguage .NET Editor to be as flexible as it needs to be.

We can customise the PowerLanguage .NET Editor by disabling certain windows, setting windows to auto-hide, move windows to another location, and undock windows from the editor. We discuss each of these below.

Disabling windows in the PowerLanguage .NET Editor

By default, the PowerLanguage .NET Editor looks like this:

Default appearance of the PowerLanguage .NET Editor

Here we can see several windows: Studies and Help Contents on the right, and Errors, Output, and Help in the bottom.

All of those active windows are listed in the ‘View’ menu:

View menu in the PowerLanguage .NET Editor

Clicking on the menu items in the ‘View’ menu disables (or enables) certain windows. And so disabling the Navigator, Help Contents Bar, and Help Bar makes this menu appear as:

View menu in the PowerLanguage .NET Editor

Then if we open a MultiCharts .NET script, like the standard ‘Mov_Avg_Exponential’ indicator, the PowerLanguage .NET Editor looks like:

EMA indicator opened in the PowerLanguage .NET Editor

If we want to organise the PowerLanguage .NET Editor without disabling its windows, we can also set them to auto-hide.

Auto-hiding the windows in the PowerLanguage .NET Editor

The auto-hide feature in the PowerLanguage .NET Editor causes a window to slide out of the way when we use another window. The ‘Auto-hide’ button is a little push pin that changes its angle depending on whether the window is set to auto-hide ( ) or not ( ).

We can find that button to the left of the window’s close button:

Studies window with the auto-hide button

When we click the ‘Auto-hide’ button, the window (or group of windows) becomes hidden. Its name then appears on a tab at the edge of the PowerLanguage .NET Editor window:

Studies window with the auto-hide button

To use the window again, we need to point the mouse to its tab so that it moves back into view. That means hovering over the Studies tab shows that window again:

Hovering on the Studies window

To keep the window open, we need to click the ‘Auto-hide’ button again after the window has slide back into view:

Auto-hide of the Studies window disabled

Auto-hide is a great feature to focus on the code while having the windows still available, but just not in the immediate view. For example:

PowerLanguage .NET Editor with no open windows

Another way to customise the PowerLanguage .NET Editor is to rearrange the windows themselves.

Docking windows in the PowerLanguage .NET Editor

We can change the location of a window by drag-and-drop it to another place with the mouse. Let’s say we want to change the location of the Output window, which is by default tucked away at the bottom:

PowerLanguage .NET Editor with Output window

We can dock the Output window to another location in the PowerLanguage .NET Editor by clicking on its tab (the text with the icon; ) and holding down the left mouse button while moving the mouse. That brings up several positioning indicators:

Docking tools when moving a window

If we move the window to one of those icons, a shadow appears to where the window would go if we release the mouse button. And so moving the Output window to a left indicator displays the following shadow:

Docking tools' shadow when moving a window

Dropping the Output window on that location moves it to the left side of the PowerLanguage .NET Editor:

Changed the location of the Output window

Another way to use the positioning indicator is grouping windows together in the same location.

Tabbing windows in the PowerLanguage .NET Editor

We already saw with moving the Output window that, when we click on a window’s tab and hold down the mouse, a cluster of five positioning indicators appears:

PowerLanguage .NET's positioning indicator

This diamond-looking tool allows us to easily dock a window in the PowerLanguage .NET Editor. It has five options: the center square will tab the window with the current window below it. The up, right, down, and left indicators place the hovering window to the top, right, bottom, or left of the window it hovers on.

And so when we hover the Output window above the left indicator, the shadow shows us that it will be placed to the left of the current window:

Moving a window to the left

After releasing the mouse button, the Output window is placed besides the Errors and Help windows:

Output window placed side-by-side

With the same positioning indicator we can also tab a window with another window. For that we first need to click on a window’s tab and then drag it to the window where we want to place it.

For example, if we click on the Studies tab and drag it to where the Output window is placed, the positioning indicator appears and we can drop it on the middle icon:

Dropping a window on the middle positioning indicator

After releasing the window on that location, the Studies window is tabbed with the Output window:

Moving the Output window besides the Studies window

Note that we can also change the order of tabs in a group by clicking on a window tab and dragging it before or after another tab.

Detaching windows in the PowerLanguage .NET Editor

Besides moving windows to another location we can also detach them from the PowerLanguage .NET Editor to move them anywhere on the desktop. We can undock a group of windows or just a single window.

To detach a window group, click on any of its windows’ titles and drag it outside the PowerLanguage .NET Editor. Or double-click on a window title:

Detaching the Output window group in the PowerLanguage .NET Editor

Both actions give a floating window group:

Detaching a whole group of windows in the PowerLanguage .NET Editor

To move the window group back into the PowerLanguage .NET Editor, double-click on its window title. Alternatively, dragging it back into the Editor will make the positioning indicators appear again.

Undocking a single window in the PowerLanguage .NET Editor

We can also have a single window floating around, which leaves the rest of the group docked. For undocking a single window we need to drag-and-drop a window’s tab outside of the PowerLanguage .NET Editor or double-click on a window’s tab. So to detach the Output window, we can double-click on its tab ( ):

Undocking the Output window in the PowerLanguage .NET Editor

Doing so makes the Output window flowing around freely:

Floating Output window

We move that detached window back into the PowerLanguage .NET Editor by double-clicking on its window title or dragging it onto the Editor so that position indicators appear.

Dividing the PowerLanguage .NET Editor code window into different panels

While the main window of the PowerLanguage .NET Editor cannot be detached or move, we can split this editor window horizontally and/or vertically. We do that with the small dividers next to both scroll bars (see arrows):

Window dividers in the PowerLanguage .NET Editor

So if we click on the vertical scrollbar divider and drag the mouse, the code window is split horizontally:

PowerLanguage .NET Editor split horizontally

To undo this effect, we drag the vertical scrollbar divider back to its original location. Similarly, dragging the horizontal scrollbar divider splits the window vertically:

PowerLanguage .NET Editor split vertically

With both dividers we can also split the window into four areas:

PowerLanguage .NET Editor split horizontally and vertically

Each of these window panels can only display the same document; we cannot place a strategy script in a left window panel and an indicator in a right window panel, for instance.

If after changing the PowerLanguage .NET Editor’s appearance you want to go back to the standard layout, see resetting the PowerLanguage .NET Editor layout. In exploring the menu items we discuss the different windows and how they can be enabled or disabled.

Summary

MultiCharts .NET scripts are made and edited in the PowerLanguage .NET Editor. That code editor has several windows that make coding scripts easier. We can customise the editor’s appearance by removing those windows, setting them to auto-hide, moving them to another location, tabbing them together, or detaching them from the PowerLanguage .NET Editor.


References

Liberty, J. & MacDonald, B. (2009). Learning C# 3.0: Master the Fundamentals of C# 3.0. Sebastopol, CA: O’Reilly Media.

Microsoft Developer Network (n.d.). How to: Arrange and Dock Windows. Retrieved on July 14, 2015, from https://msdn.microsoft.com/en-us/library/z4y0hsax.aspx

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

PowerLanguage .NET Help (n.d.). Retrieved on November 18, 2014, from http://www.multicharts.com/downloads/PowerLanguage.NET.chm

Sempf, B., Sphar, C., & Davis, S.R. (2010). C# 2010 All-In-One for Dummies. Hoboken, NJ: John Wiley & Sons.