Automatic Order Logging Using Object Oriented Programming

Add automatic order logging to any TradeStation EasyLanguage strategy in minutes with this self-contained object-oriented strategy, useful for debugging and monitoring.


Add automatic order logging to any TradeStation EasyLanguage strategy in minutes with this self-contained object-oriented strategy, useful for debugging and monitoring.

Plot indicator values directly from strategy code with TLPlotFast, instead of duplicating indicator code in the strategy. Includes a moving-average crossover example.

The most efficient EasyLanguage coding structure makes code run only when required and no more often, which gains more speed than any other optimization technique.
Three EasyLanguage functions that prefix debugging print statements with date, time, symbol, BarStatus, MarketPosition and bar number.
Why stop-limit orders can protect you from bad fills when a stock gaps through your stop on news, with examples for both sell stops and breakout buy stops.
Reusable EasyLanguage structure for issuing strategy orders and finding out which buy or sell, limit or stop order actually executed, so strategy logic can react to it.
An EasyLanguage function for Van K. Tharp's Expectancy, so each optimization run can write it to a file alongside other custom objectives for analysis in Excel.

An EasyLanguage function for Van K. Tharp's System Quality Number (SQN), a measure of strategy performance that can serve as a custom optimization objective.
The LoadTradeArray function loads every closed strategy trade into an array, including bars where two trades close at once, for objectives like SQN or Expectancy.

Standard deviation functions that also return the mean, so you don't calculate it twice. Includes versions for price series and for arrays.

Defines a stop by four parameters (price reference, offset, trigger and reset padding) and builds a flexible trailing stop function and indicator from them in EasyLanguage.

An improved LastBarOnChart function that works on tick and volume charts and becomes true on the last bar in real time without waiting for the next tick.
A function that returns the strategy optimization pass number, so you can run one-time calculations and output optimization results only once per optimization run.

Faster HighestFC and LowestFC functions that avoid looping through every bar on each call, compared with TradeStation's Highest, HighestFast and HighestFC.

A faster linear regression algorithm that replaces the loop and summation in TradeStation's LinearRegFC with incremental calculations. Includes speed comparisons.

A swing trading pull-back entry technique that adjusts for price and volatility, makes risk and reward easy to calculate, and works across stocks, futures and Forex.

Correct formulas for circular array indexing in EasyLanguage, including indexes far into the past or future, with the CircularIndex function and a test indicator.

The BarsDisplayed function returns the number of bars currently visible on a TradeStation chart, useful for positioning text and deciding which indicators to show.

An improved version of the BarsDisplayed function, which returns the number of bars currently visible on a TradeStation chart.
Why it pays to keep EasyLanguage code in reusable functions, and how to pass many static input parameters to them efficiently so the function-call overhead stays small.

A semi-automated EasyLanguage strategy that trades from trend lines you draw on the chart: one line sets the stop entry, one the profit target and one the stop loss.

TickRate shows how many ticks a symbol trades per second (or per minute), a quick read on current liquidity in charts and RadarScreen. Includes a standard EasyLanguage version and a more efficient OOEL version driven by a once-per-second Timer.

An indicator for charts and RadarScreen that counts the bars since the last moving average crossover, so you can sort a watchlist to find the stocks that have just crossed long or short.

FxDeviation plots how far price has moved from any centerline that RibbonsPlotter can draw, in a choice of deviation units. Available as an indicator for charts and RadarScreen and as a function.

An EasyLanguage Sharpe Ratio function and indicator for charts and RadarScreen, for comparing risk-adjusted return across many symbols, longs versus shorts, and intraday time frames.
Uses the EasyLanguage Timer object to delay each step of a strategy by a set number of seconds, so orders are acknowledged by the trade server before the next step runs.

RibbonsPlotter is a super-indicator that plots many kinds of price ribbons and bands from one indicator, with the centerline and the band width chosen independently (Bollinger, Keltner, Jurik and more).

LRChan draws a linear regression channel between two points you pick on the chart, with parallel deviation lines, to estimate entry and exit points for swing trades within a trend.

A RadarScreen indicator that marks the symbols you currently hold and shows account, shares, average price, net gain %, P/L, total cost and market value, updated every few seconds.

An EasyLanguage indicator that measures liquidity as dollars traded per day instead of shares, so you can compare it directly with your position size. Works on charts and RadarScreen.

Shows how to erase part of an indicator plot in TradeStation by over-plotting it, and how to avoid the artifacts that simple over-plotting leaves behind. Includes the PlotErase indicator code.