The Best Fit Straight Line.
Let us imagine a set of closing prices on a graph with time as the horizontal axis and price as the vertical axis. Let us further suppose that we have only twenty closing price dots at twenty time intervals. How can we draw a straight line through those twenty prices such that the sum of all the squared differences between the prices at each time interval and the straight line that is being fit to the data is minimized? This is called the "Least Squares Fit" line of the data (also referred to as the linear regression line and Best Fit Line). This mathematical technique is available in most of today's technical analysis software.
The formula for the straight line is:
a + b*t
where a is the initial value of the line, b is the slope of the line, and t is the time of the bar.
If you are fitting the straight line to N prices then the "Best Fit" coefficients a and b can be solved for quite easily as shown in my article.
Using the a, b
coefficients found above we can forecast the next bar's price using the formula:
Pf = a + b*(N+1)
The next bar's forecast should create a leading indicator.
The Next Bar Forecast System is constructed by calculating pf
at each bar and plotting it on the price chart. In general what we will be doing is following the plotted curve of pf
. When the curve increases by a percentage amount pctup from the previous prior low of the curve we will go long. When the curve falls by the percentage amount pctdn from the previous prior high of the curve we will go short.
Next Bar Forecast System Input Parameters
- N = The Least Squares lookback period.
- pctup = The percentage amount the curve pf has to increase from the lowest low of pf recorded while short that will issue a buy signal.
- pctdn = The percentage amount the curve pf has to fall from the highest high of pf recorded while long that will issue a sell signal.
- XOpn = Used only for Intraday bars. Prevents buys or sells until XOpn bars have past since the open. 0 = Ignore. Note, this input parameter avoids many opening gap whipsaws.
- Xtime, = Used only for Intraday bars. Exit position before or at the close. If XTime= 1610 then exit at 4:10pm EST. 0 = ignore .
The Next Bar Forecast system is orientated to short term trading in all bar ranges (1 tic, 1 min, 5min, etc., daily) and with any tradeable price series. This system can also be used on futures, stocks, options, and mutual fund data.
For TradeStation, Multicharts all of the EasyLanguage™ strategy and indicator codes are directly importable into your choice of TS9 or MC and are fully disclosed. There are no locks of any kind on the EasyLanguage source code. The C++ DLL code is not disclosed. The Input parameters to the strategy and indicator are changeable and optimizable so that the user can develop his own parameter set on his price series and time frame of interest. Although the system results will give parameters for the intraday or daily futures the system was tested on, the user can easily use this system on any tradeable or on any time frame.
For NeuroShell Trader/DayTrader Pro, the Trading Strategy and Indicators are directly imported into NeuroShell via a special setup exe file and are fully disclosed in the Indicator wizard "MA_KeyTrSys" category and in the Trading Strategy Wizard "MA_KeyTrSys" directory. The C++ DLL code is not disclosed. The Input parameters to the strategy and indicator are changeable and optimizable so that the user can develop his own parameter set on his price series and time frame of interest. Although the system results will give parameters for the intraday or daily futures the system was tested on, the user can easily use this system on any tradeable or on any time frame.
The accompanying page manual consists of:
- A short tutorial on the details of performing walk forward optimization with out-of-sample testing using TradeStation and how I look for the "best" parameters in a TS combinatorial optimization run(available in the TS Manual only).
- A complete description of the Next Bar Forecast system, it's derivation and it's input parameters.
- The walk forward optimization method used and a table of the walk forward results for the system.
- The input parameter test ranges
- How to setup a chart using the Strategies and Indicators in TradeStation or NeuroShell.
- An EasyLanguage Strategy and Indicator code printout (TradeStation only)
- A chart printout with the Strategy and it's associated Indicator with all the system buy and sell signals displayed on the chart.
- Performance Summaries for the test period and the out-of sample period segments.
- Special %Runup-%Drawdown for each trade, trade by trade Summaries.
In addition The Next Bar Forecast system has its exact duplicate in indicator form which is displayable on the price chart, so that the user can visually see how the buy and sell signals occur.
For TradeStation, MultiCharts The Next Bar Forecast System™
is one of the 9 systems included in the The Key Daily &Intraday Trading Systems package is being offered through Meyers Analytics L.L.C.
. Shipping via Email consists of a zip file containing the Manual in Adobe PDF format, ELD file and DLL file.
For NeuroShell Trader/DayTrader Pro, The Next Bar Forecast System™
is one of the 9 systems included in the . The Key Daily &Intraday Trading Systems package is being offered through Meyers Analytics L.L.C.
. Shipping via Email consists of a zip file containing the Manual in Adobe PDF format and the MA-KeyTrSysSetup.exe setup file.
How To Order
To order online click
. To order via Fax or mail using a Visa or Master Card please fill out the order form on the Order Form
page and Fax
it to the telephone number on the order form or mail it to the address on the order form. If you would like to talk to me about the product, please call me at (312) 280-1687
M-F 12pm to 5pm CST. All E-mail queries can be sent to email@example.com.
Thank you for your Interest....Dennis Meyers
The Next Bar Forecast System Performance US Bonds Daily Continuous Futures
Past hypothetical performance is no guarantee of future results
|Next Bar Forecast System
||US Continuous Futures Daily Bars
|| The Next Bar Forecast System was presented in the May/2003 issue of Active Trader Magazine and the May/1998 issue of Stock & Commodities Magazine
The Next Bar Forecast System Performance QQQ 5 min bars
Past performance is no guarantee of future results
||11/11/02 to 11/22/02
|Number of Trades
|Next Bar Forecast
||QQQ 5min Bars
|| The Next Bar Forecast System was presented in the May/2003 issue of Active Trader Magazine