Blog

Limit Stops Can Help Avoid Bad Fills

Mark Krisburg

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.

Van K. Tharp's Expectancy Function

Mark Krisburg

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.

Loading Strategy Trades Into An Array

Mark Krisburg

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.

A Flexible Trailing Stop

Mark Krisburg

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.

A Faster Linear Regression Algorithm

Mark Krisburg

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

Circular Index Function

Mark Krisburg

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

Function BarsDisplayed

Mark Krisburg

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

Tick Rate Indicator

Mark Krisburg

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.

RibbonsPlotter Indicator

Mark Krisburg

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).

Position Indicator for RadarScreen

Mark Krisburg

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.

Average Dollars Traded Liquidity Indicator

Mark Krisburg

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.

How To Erase a Plot

Mark Krisburg

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.