LRS Strategy Suite for AmiBroker Package Description

Linear Regression Slope trading for AmiBroker
User avatar
progster
Posts: 948
Joined: Thu Jul 26, 2007 7:20 pm
Contact:

LRS Strategy Suite for AmiBroker Package Description

Postby progster » Mon Oct 05, 2009 8:59 pm

Package: LRS Strategy Suite for AmiBroker

Linear Regression Slope is an immediately understandable measure of the direction and speed of market motion. The role of fast moves, and the potentially tradable opportunities they create, is a subject appropriate for objective study by every trader.

CodeForTraders is pleased to offer the LRS Strategy Suite for AmiBroker as a low-cost, pre-written, powerful, well-organized place from which to begin (or extend) your AB journey.

What It Is

The LRS Strategy Suite for AmiBroker is 3 AFL formulas which together implement a collection of analysis, visualization, presentation, and optimization techniques to create a complete solution for investigating LRS trading (or trading of any other indicator, after minor editing).

What It Looks Like

Observe the raw/smoothed LRS indicator in the middle pane. In this example, the strategy has been configured to enter long where the 7-period smoothed LRS-3 dips below a threshold value of -.4, and to enter short where the 7-period smoothed LRS-3 rises above a threshold value of 2.9.

You can observe the smoothed line goes yellow when these events take place.

Image

Notice how the bars in the upper pane have been colored green during long trades, red during short trades, and white when no trades are in progress. Trade entry signal bars are indicated by the green and red arrows. All signals (buy, sell, short, cover) may be seen in the (optional) histogram display at the bottom of the price pane.

These pictures show the extensive set of parameters made available in the main formula (the one in the price pane), which is designed to provide easy control of both interactive visualization, and automatic optimization as desired.

Image
Image
Image

Note the lines that start with "+++++++ ". These indicate blocks of functionality which may be switched on and off as desired for backtests and optimizations.

The lines that end with " ---------- " are individual parameters which may be set to either be optimized or "locked down" from right here in the Parameter Dialog.

Read on to learn about the many other features provided.

For insight into the flexibility and convenience of the LRS Suite, please view this RSI Suite video, which introduces the technology in use:

Video: RSI Strategy Suite - Visual Introduction

What It Does

The LRS Strategy Suite Package uses AmiBroker Formula Language (AFL) to implement a long list of desirable features. Each section of code is clearly marked and commented.

Included you will find:

Code for setup of cooperating indicator
Code for adding custom metric(s)
Code for AA window display of non-optimized parameters
Code for optimizer choice and setup
Code for single contract testing
Code for trading on the Open of the next bar after a Signal.
Code for technical analysis calculation(s).
Code for trading long-only, short-only, or in both directions
Code for trading signals in the opposite direction
Code for a choice of trade signal filters
Code for limiting trading to an intraday time window
Code for optimizable indicator-based exits
Code for optimizable StopLoss, ProfitTgt, and TrailingStop
Code for determining and displaying exit reason
Code for histogram visualization of buy/sell/short/cover arrays.
Code for passing NetPft to cooperating display indicator in another chart pane.
Code for Displaying signals as an Exploration
Code for on-chart plotting of price, signal arrows, and trade duration/direction bar coloring
Code for creating and displaying informative title text
Code for display of filters

These features are provided in the context of a 4-level, indicator-based trading model:

Low level on the indicator (i.e weakness, oversold) for Long Entry (LE)
High level on the indicator (i.e strength, overbought) for Short Entry (SE)
Long Exit (LX) level on the indicator (for optional indicator-based long trade profit-taking)
Short Exit (SX) level on the indicator (for optional indicator-based short trade profit-taking)

For optimization, there are 8 major numeric dimensions:

  • LRS_Base_Period
  • LRS_Smooth_Period
  • LRS_LowLvl
  • LRS_HighLvl
  • LRS_LX_Lvl
  • LRS_SX_Lvl
  • StopLossPct
  • PftTgtPct
  • TrailingStopPct
along with various other useful switches and choices.

The code uses the LRS as the provided calculation, but has been carefully constructed to allow you to easily substitute a different indicator with only very minor changes to the source.

For a visual explanation of the features and use of the 4-line indicator trading model, please see this video, originally prepared for the RSI Strategy Suite:

Video: RSI Strategy Suite - Indicator Trading Model

Innovations

This strategy has been specially designed to allow wide-scope or narrow-scope optimization to be configured directly from the AB Parameters Dialog. This means optimization across any desired combination of the major numeric dimensions based strictly on Dialog settings without requiring code edits.

Also, custom metrics are used to ensure that non-optimized (i.e. locked-down) major dimensions are displayed in the AmiBroker Automatic Analysis window optimization results. This ensures that the report more thoroughly reflects the configuration of parameters used to generate it (which is not normally true by default).

Image
(Note how the "locked down" LRS_Base and LRS_Smooth parameters remain unchanging throughout the optimization, yet are still part of the final display. Without them, you wouldn't know everything important about what created the performance.)

For a visual explanation of the flexible optimization implementation, please see this video, originally prepared for the RSI Strategy Suite:

Video: RSI Strategy Suite - Flexible Optimization w/o Code Edits


You may choose to operate the code with any of the non-exhaustive AmiBroker optimizers (CMAE, Tribes, SPSO). Again, no code edits required for this!

The goal of this code is to advance the new user past months of study and experimentation directly to feature-rich, working code that is both

  • immediately useful as-is
  • easily repurposed and extended

Are you a sophisticated AB user/programmer who has already written similar capabilities for yourself?

If not, CFT believes you will not find a better jump-start anywhere, at any price.

What You Get

  • The primary LRS-based trading formula for backtesting/optimization/display
  • Cooperating Net-Profit formula for separate pane display
  • Cooperating rLRS (remote LRS) formula, for displaying the LRS per the strategy formula settings
  • A .chart file for creating a window similar to the one shown above
  • Customer Support for initial installation.
This package is distributed as fully-disclosed AFL. You will be able to modify and extend it as desired, but you may not share it with non-licensees (just send them here instead!).

What It Costs

Only $150 for a single, permanent personal-use license. Institutional and multi-person licenses are also available (contact: questions@CodeForTraders.com).

How You Get It

Visit the product page then hit the 'Add to Cart' button.
The package will be emailed to you after your PayPal payment is processed.
Please be aware of the caveats before you order. Thanks!

User avatar
progster
Posts: 948
Joined: Thu Jul 26, 2007 7:20 pm
Contact:

Re: LRS Strategy Suite for AmiBroker Package Description

Postby progster » Tue Mar 30, 2010 5:19 pm

Now available:

LRS Strategy Suite, Deluxe Timeframe Version

Added features in this Deluxe version include:

  • Multiple TimeFrame (MTF) support
  • A bar-count based time stop
  • A new setting to UseHookForExits
  • A third entry signal type ( one-bar reversals in OB/OS areas )
  • New filters based on the multiple timeframe support
  • An advanced multi-choice interface for customers of CFT's Optimization Iteration Reload for AmiBroker product.

Please visit the Deluxe Timeframe Versions product page for more details and links to demonstration videos.


Return to “LRS Strategy Suite”

Who is online

Users browsing this forum: No registered users and 1 guest