Stock Fusion Plugin
Stock Fusion Plugin
____________________________________________________________________________________________________________________________
October 2008
Contents
Contents .......................................................................................................................................................................2
Introduction ...................................................................................................................................................................3
Installation.....................................................................................................................................................................4
System requirements ................................................................................................................................................4
Licensing.......................................................................................................................................................................5
Institutional architecture................................................................................................................................................8
Algorithms...................................................................................................................................................................10
Trading platforms........................................................................................................................................................13
TradeStation............................................................................................................................................................13
Metastock................................................................................................................................................................15
Ninja Trader ............................................................................................................................................................17
MultiCharts ..............................................................................................................................................................18
Excel .......................................................................................................................................................................18
Algorithm settings and limits.......................................................................................................................................21
References .................................................................................................................................................................25
System requirements
Microsoft Windows 2000, XP, 2003 Server, Vista, 2008 Server
Intel x86 compatible computer with Pentium 4 processor 1 GHz or better, RAM 64 MB, 10 MB disk space.
While system requirements for running application are minimal, its real resource consumption will totally depend on
resources required by trading terminal and the frequency of the data frame. Trading on short intraday signals will
require top performance computers available on the market. Even in this case we cannot guarantee that system
resources will be sufficient for stable and timely delivery of forecasts and trading signals. We do not bear any
responsibility for any delays realted with insufficient performance of client hardware.
Select the desired product in the list and then click “Request license key” button. After that, License manager will
collect the necessary information about your system and will prepare license key request e-mail ready to send to
us. Please carefully review this info and send it, if case information is correct. We will send you license key for your
purchased product within one business day after your payment is confirmation.
You can watch loaded algorithms by double clicking this application icon:
TradeStation
To deploy ForeStock on TradeStation, please follow these steps:
1. Install TradeStation 2000i or above
2. Install ForeStock
3. Enter license keys for all components
4. Run ForeStock setup for Trade Station
{*******************************************************************
Description: Aura Forecast Engine Extended
Provided By: Boris Zinchenko (c) Copyright 2008
********************************************************************}
{ Inputs }
Inputs:
AlgorithmName(String),
InputLength(Numeric),
SeriesNames(String),
Parameters(String),
ForecastLength(Numeric),
Forecast(NumericRef);
{ Inner variables }
Variables: Dummy(0), Counter(0);
{ Call solver }
Forecast = AURA_ENGINE_EX((LPSTR)AlgorithmName, (DWORD)MaxBarsBack, (DWORD)PriceScale,
(LPLONG)&Date, (LPINT)&Time, (LPLONG)&Open, (LPLONG)&High,
(LPLONG)&Low, (LPLONG)&Close, (LPLONG)&Volume, (LPLONG)&OpenInt,
(LPSTR)SeriesNames, (LPSTR)Parameters, (DWORD)ForecastLength);
AuraEngineExt = Forecast;
{*******************************************************************
Description: StockFusion Universal Signal
Provided By: Boris Zinchenko (c) Copyright 2008
********************************************************************}
Variables: Forecast(0);
If (Forecast < Close) AND (Close > Close[1]) Then Sell This Bar at Close;
If (Forecast > Close) AND (Close < Close[1]) Then Buy This Bar at Close;
Indicators
Algorithm Metastock
1 day ROC of 3 Smooth EMA 1DAYROCOF3SMOOTHEMA
Absolute Price Oscillator ABSOLUTEPRICEOSCILLATOR
Aroon Down AROONDOWN
Aroon Oscillator AROONOSCILLATOR
Aroon Up AROONUP
Average Price AVERAGEPRICE
Average True Range AVERAGETRUERANGE
Avg Direct Move Idx Rating AVGDIRECTMOVEIDXRATING
Avg Directional Move Idx AVGDIRECTIONALMOVEIDX
Chaikin AD Line CHAIKINADLINE
Chaikin AD Oscillator CHAIKINADOSCILLATOR
Commodity Channel Index COMMODITYCHANNELINDEX
Directional Movement Index DIRECTIONALMOVEMENTINDEX
Double Exponential MA DOUBLEEXPONENTIALMA
Exponential Moving Average EXPONENTIALMOVINGAVERAGE
FXS Adaptive Moving Average FXSADAPTIVEMOVINGAVERAGE
Hilbert Dominant Cycle Period HILBERTDOMINANTCYCLEPERIOD
Hilbert Dominant Cycle Phase HILBERTDOMINANTCYCLEPHASE
Hilbert Phasor Components HILBERTPHASORCOMPONENTS
Hilbert SineWave HILBERTSINEWAVE
Hilbert Transform Trendline HILBERTTRANSFORMTRENDLINE
Hilbert Trend vs Cycle Mode HILBERTTRENDVSCYCLEMODE
Kaufman Adaptive MA KAUFMANADAPTIVEMA
Linear Regr Angle LINEARREGRANGLE
Linear Regr Intercept LINEARREGRINTERCEPT
Linear Regr Slope LINEARREGRSLOPE
Linear Regression LINEARREGRESSION
MESA Adaptive Moving Average MESAADAPTIVEMOVINGAVERAGE
Median Price MEDIANPRICE
MidPoint over period MIDPOINTOVERPERIOD
Midpoint Price over period MIDPOINTPRICEOVERPERIOD
Minus Directional Indicator MINUSDIRECTIONALINDICATOR
Ninja Trader
To install on Ninja Trader, please follow these steps:
1. Install Ninja Trader
2. Install ForeStock
3. Enter license keys for all components
4. Open Ninja Trader
5. Use menu: File > Utilities > Import NinjaScript
6. Select “EENinja.zip” in setup directory and confirm import
7. Ignore warnings on external assemblies. They are all preconfigured by our installer
Open chart and add indicator to it. Type algorithm name exactly as specified an the list of available algorithms
Excel
To deploy ForeStock on Microsoft Excel, please follow these steps:
1. Install Microsoft Office 98 or above
2. Install ForeStock
'
' initialise forecasting engine
'
Sub InitEngine()
Exit Sub
wrong:
MsgBox "Error communicating forecast engine!"
End Sub
'
' calculate forecasts
'
Sub CalculateForecasts()
' dimensions
NumInputs = 5
InputLen = SeriesLen()
NumOutputs = 1
ForecastLen = 1
Dim InputData() As Double
Dim OutputData() As Double, VarianceData() As Double, DateData() As Date
Dim SeriesNames As String, ModelBuffer As String, ModelParam As String
For i = 1 To InputLen
For j = 0 To NumInputs - 1
InputData(i + j * InputLen) = shData.Cells(i + rowBegin, j + 2)
Next j
Next i
'Aura = CreateObject("Aura.Expert")
'Aura.Calculate SolverName, NumInputs, InputLen, _
' NumOutputs, ForecastLen, OutputData, VarianceData, DateData
SeriesNames = "Open" & vbLf & "High" & vbLf & "Low" & vbLf & "Close" & vbLf & "Volume"
Exit Sub
wrong:
MsgBox "Error in calculation!"
End Sub
Predictors
Algorithm Input length Forecast length Number of inputs Number of outputs
Min Max Min Max Min Max Min Max
ARIMA 30 2147483647 1 2147483647 1 1 1 1
Exponential Fit 3 2147483647 1 32767 1 1 1 1
Finite Impulse Response NN 64 2147483647 1 2147483647 1 1 1 1
Finite State Markov Automaton 256 2147483647 1 1 1 1 1 1
Forecast with average value 1 2147483647 1 32767 1 1 1 1
History Prophet 1 2147483647 1 1 1 2147483647 1 2147483647
Linear Regression 7 2147483647 1 1 1 1 1 1
Linear regression 3 2147483647 1 2147483647 1 1 1 1
Logarithmic Fit 3 2147483647 1 2147483647 1 1 1 1
Naive Predictor 1 2147483647 1 1 1 2147483647 1 2147483647
Square Fit 3 2147483647 1 2147483647 1 1 1 1
Square Root Fit 3 2147483647 1 2147483647 1 1 1 1
Stepwise Best Regression 7 2147483647 1 1 2 2147483647 1 1
MVAR
Indicators
Algorithm Input length Forecast length Number of inputs Number of outputs
Min Max Min Max Min Max Min Max
1 day ROC of 3 Smooth EMA 7 2147483647 0 0 1 1 1 1
Absolute Price Oscillator 7 2147483647 0 0 1 1 1 1
Aroon Down 7 2147483647 0 0 4 4 1 1
Aroon Oscillator 7 2147483647 0 0 4 4 1 1
Aroon Up 7 2147483647 0 0 4 4 1 1
Average Price 7 2147483647 0 0 4 4 1 1
Average True Range 7 2147483647 0 0 4 4 1 1
Avg Direct Move Idx Rating 7 2147483647 0 0 4 4 1 1
Avg Directional Move Idx 7 2147483647 0 0 4 4 1 1
Chaikin AD Line 7 2147483647 0 0 5 5 1 1
Chaikin AD Oscillator 7 2147483647 0 0 5 5 1 1
Commodity Channel Index 7 2147483647 0 0 4 4 1 1
Directional Movement Index 7 2147483647 0 0 4 4 1 1
Double Exponential MA 7 2147483647 0 0 1 1 1 1
Exponential Moving Average 7 2147483647 0 0 1 1 1 1
FXS Adaptive Moving Average 7 2147483647 0 0 1 1 1 1
Hilbert Dominant Cycle Period 7 2147483647 0 0 1 1 1 1
Hilbert Dominant Cycle Phase 7 2147483647 0 0 1 1 1 1
Hilbert Phasor Components 7 2147483647 0 0 1 1 1 1
Hilbert SineWave 7 2147483647 0 0 1 1 1 1
Hilbert Transform Trendline 7 2147483647 0 0 1 1 1 1
Hilbert Trend vs Cycle Mode 7 2147483647 0 0 1 1 1 1
Kaufman Adaptive MA 7 2147483647 0 0 1 1 1 1
Linear Regr Angle 7 2147483647 0 0 1 1 1 1
Linear Regr Intercept 7 2147483647 0 0 1 1 1 1
Linear Regr Slope 7 2147483647 0 0 1 1 1 1
Linear Regression 7 2147483647 0 0 1 1 1 1
MESA Adaptive Moving 7 2147483647 0 0 1 1 1 1
Average
Median Price 7 2147483647 0 0 4 4 1 1