Absolutely! I’m familiar with TradeStation’s proprietary EasyLanguage (often written “EasyLanguage” or “EL”). It’s the scripting language embedded in TradeStation, MultiCharts, and a few third-party trading platforms, chiefly used to build:
Below is a quick primer plus some annotated examples so you can see what EasyLanguage looks like “in the wild.” Feel free to ask for something more specific—happy to dive as deep as you need. 🚀
────────────────────────────────────────
EasyLanguage at a Glance
────────────────────────────────────────
• Syntactically it feels like a hybrid of Pascal and BASIC.
• Case-insensitive, free-form white-space.
• Strong finance/trading vocabulary baked in: Close, High, Low, Volume, Date, Time, BarNumber, …
• Runs bar-by-bar (or tick-by-tick) inside the platform’s data engine.
• Two big families of keywords:
– “Indicator” keywords: Plot1 … Plot99, SetPlotColor, etc.
– “Strategy” keywords: Buy, Sell, SellShort, SetStopLoss, SetPositionSize, etc.
• Object-Oriented Extensions (EL‐OO): Class … EndClass, Object:“MyObj”, .MethodName, etc. (Requires TS v9.1 or higher).
/* ---------- Entries & Exits ---------- */
if FastMA crosses above SlowMA then
Buy("LongEntry") TradeSize contracts next bar at market;
if FastMA crosses below SlowMA then
Sell("LongExit") next bar at market;
/* ---------- Risk Management ---------- */
SetStopLoss(300); { 300 per contract }
SetProfitTarget(500); { 500 per contract }
────────────────────────────────────────
4. Piece of Object-Oriented EasyLanguage
(Tiny “PositionSizer” class)
────────────────────────────────────────
Class PositionSizer
private:
numeric mAccountRisk;
public:
code
method void Initialize(numeric pctRisk)
begin
mAccountRisk = pctRisk;
end;
method numeric Shares(numeric stopPts)
begin
value1 = I_MarginAccountEquity * mAccountRisk; // built-in acc’t equity
if stopPts > 0 then
Shares = IntPortion(value1 / (stopPts * BigPointValue))
else
Shares = 0;
end;
EndClass;
/* --- Using it in a strategy --- */
vars:
PositionSizer pSizer(Object);
if CurrentBar = 1 then
pSizer = new PositionSizer; // constructor call
pSizer.Initialize(.02); // risk 2 % of equity
value1 = High[1] - Low; // crude stop size example
value2 = pSizer.Shares(value1); // shares to trade
if MarketPosition = 0 and value2 > 0 then
Buy value2 shares next bar at market;
────────────────────────────────────────
5. Tips, Gotchas & Best-Practices
────────────────────────────────────────
• EL executes once per bar unless you set UpdateOnEveryTick = True.
• “Crosses above/below” is edge-triggered: it returns True only on the bar where the relationship first becomes true.
• Global variables persist across symbol/interval changes unless you recompile; use Vars/Inputs for bar-scope storage.
• Date/time comparisons: EL uses YYYYMMDD integers (e.g., 20240123) and HHMM integers (e.g., 1530).
• OOP is powerful but not mandatory; many institutional coders still write pure procedural EL because it’s faster to prototype.
• Use Print() or FileAppend for debugging—TradeStation also offers the Output window & Debugging compile mode.
• Performance: prefer arrays over large look-back loops when possible; avoid excessive string operations inside the bar loop.
────────────────────────────────────────
6. What Can I Help You Build?
────────────────────────────────────────
• Custom indicator?
• Full strategy with money management?
• Optimization/Walk-Forward code?
• DLL or .NET object integration?
Just let me know the idea, any rules you have in mind, and the instrument(s)/timeframe you trade, and I’ll sketch the EasyLanguage code (and explain how to attach/test it).