PowerLanguage for VS Code
Syntax highlighting and language support for PowerLanguage/EasyLanguage (MultiCharts, TradeStation).
Features
- Syntax Highlighting for
.pla and .ela files
- Code Snippets for common patterns (indicators, strategies, functions)
- Bracket Matching and auto-closing
- Code Folding for begin/end blocks
- Comment Toggling (
// and { })
Installation
From Source (Development)
Copy the vscode-powerlanguage folder to your VS Code extensions directory:
- macOS:
~/.vscode/extensions/
- Windows:
%USERPROFILE%\.vscode\extensions\
- Linux:
~/.vscode/extensions/
Restart VS Code
Open any .pla file - syntax highlighting should work automatically
Package as VSIX (Optional)
npm install -g @vscode/vsce
cd vscode-powerlanguage
vsce package
Then install the generated .vsix file via VS Code: Extensions → ... → Install from VSIX
Snippets
| Prefix |
Description |
indicator |
Full indicator template |
strategy |
Full strategy template |
function |
Full function template |
ifb |
If-then-begin-end block |
ife |
If-then-else block |
for |
For loop |
while |
While loop |
inputs |
Inputs declaration |
variables |
Variables declaration |
plotc |
Plot with conditional color |
buy |
Buy order |
sell |
Sell order |
sellshort |
SellShort order |
buytocover |
BuyToCover order |
ma |
Simple Moving Average |
ema |
Exponential Moving Average |
crossabove |
Crosses above condition |
crossbelow |
Crosses below condition |
mpos |
Market position check |
risk |
Risk management (SL/TP) |
Supported File Extensions
.pla - PowerLanguage files
.ela - EasyLanguage files
.easylanguage - EasyLanguage files
Syntax Highlighting Includes
- Keywords: if, then, else, begin, end, for, while, etc.
- Order Keywords: buy, sell, sellshort, buytocover
- Built-in Functions: Average, XAverage, RSI, MACD, etc.
- Bar Data: Open, High, Low, Close, Volume, etc.
- Position Data: MarketPosition, EntryPrice, etc.
- Colors: Red, Green, Blue, etc.
- Comments:
// and { }
- Strings:
"text"
- Numbers: integers and decimals
Contributing
Feel free to submit issues and pull requests to improve the extension.
License
MIT
| |