MultiCharts programming articles
All MultiCharts programming articles are listed on this page. Both the 'chapters' and the articles inside the chapters are listed in order of increasing difficulty, with the fundamentals first and ending with the more complex concepts.
The fundamentals of PowerLanguage
In the ‘Fundamentals of PowerLanguage’ part we begin with learning the basics of the MultiCharts PowerLanguage scripting language.
This chapter discusses the different ways to repeat programming code in MultiCharts PowerLanguage. The introduction provides a detailed overview of the chapter, while the summary gives a quick recap of the most important points.
Types of PowerLanguage loops
- The for-to loop in PowerLanguage
- The down-to loop in PowerLanguage
- The while loop in PowerLanguage
- The repeat-until loop in PowerLanguage
Controlling PowerLanguage loops
- Breaking out of PowerLanguage loops
- Skip a loop cycle with continue in PowerLanguage
- Controlling a loop with modulus: taking an action every nth time
Placing loops inside each other
- Loops inside each other: nesting loops in PowerLanguage
- Breaking out of nested PowerLanguage loops
- Skipping nested loop cycles in PowerLanguage
- Tip: Exit multiple nested loops at once with a function
Infinite (erroneous) loops
Attributes are used in MultiCharts PowerLanguage to enable or disable certain script features. The articles below discuss the different attributes and how they work, starting with an introduction and ending with a summary that repeats the essentials.
Attributes for every script
ProcessMouseEvents: enabling mouse click processing in a MultiCharts script
RecoverDrawings: prevent automatic removal of intra-bar drawings
LegacyColorValue: working with PowerLanguage’s old colour model
Trading script attributes
IntrabarOrderGeneration: generating trading orders with every price update
AllowSendOrdersAlways: even submit orders without price updates
SameExitFromOneEntryOnce: reusing exit orders in MultiCharts strategies
Working with PowerLanguage
In the ‘Working with PowerLanguage’ part we look at the different things we can program in PowerLanguage.
In this chapter we look at how we can process manual mouse clicks and keyboard keys programmatically in MultiCharts PowerLanguage. The chapter starts with an introduction that outlines the chapter and ends with a summary for a quick overview of using mouse clicks programmatically.
The PowerLanguage keywords for mouse clicks
- How to combine mouse clicks and keyboard keys in MultiCharts?
- Locating a mouse click’s bar number in MultiCharts
- A mouse click’s location: retrieving the y-axis’ price level of the click in MultiCharts
- A mouse click’s location: getting the x-axis’ time and date
- How to determine on which data series a click occurred?
- How to find out if a left or right mouse button clicked on the MultiCharts chart?
Using mouse clicks in scripts
- How to only calculate part of a script with a mouse click in PowerLanguage?
- Manipulating the chart with mouse clicks and the MultiCharts Command Line
- How to use mouse clicks to generate alerts in MultiCharts?
- How to determine in which chart area a click took place?
- How to calculate the distance of a mouse click to a chart’s corner?
Mouse clicks and chart drawings
- Plotting arrows based on mouse clicks in MultiCharts
- Freely draw trend lines with mouse clicks in MultiCharts
- Using mouse clicks to draw trend lines that snap to price bars
- Creating text boxes with mouse click data from any data series
Mouse clicks and trading strategies