For example, it is simple to use the optimizer to grow neural networks and find the best performing architecture. With the Amibroker platform and WiseTrader toolbox almost everything other neural network platforms can do can be done and more. The above are very simple examples of how the neural networks can be used. Res = RunMultiInputNeuralNetwork ( "Trend_Detection" ) The next example will execute the neural network from file because the generated formula is too big to post here. When the above formula finishes executing you can use the generated AFL version of the indicator to run the neural network or just run the neural network from file. When you run the above formula you should see a training progress dialog box. Clean up the added inputs and restore default values TrainMultiInputNeuralNetwork ( "Trend_Detection" ) Delete neural network if there is already anotherįdelete ( "WiseTraderToolbox\\NeuralNetwork\\Trend_Detection" ) Last input added is our desired output or the trend as many neural network inputs as you wantĪddNeuralNetworkInput ( VariablePeriodRSI ( C, i)) ĪddNeuralNetworkInput ( VariablePeriodRSI ( Ref ( C, - 1 ), i)) ĪddNeuralNetworkInput ( VariablePeriodRSI ( Ref ( C, - 2 ), i)) because the trained neural network won't look into the future. Anything you can imagine you can use here Trend detection (looks into the future). Set the number of hidden layers in the neural network Train the neural network for 2000 iterations The same seed value will produce the same neural network each time Set the seed value of the neural network The next formula is a simple example of creating a trend detection indicator using neural networks.
#AMIBROKER FILE EXAMPLES CODE#
The ability to convert a trained neural network to AFL code is the first of its kind not available anywhere else. The other neural network functions allow you to train a neural network and save it to a file to run later or even generate AFL code directly. You can stop and resume training at any moment because all adaptive neural network calculations are stored in the plugin's internal memory and only compute as much as is needed so it can be used in your real-time trading as the neural network will only train and predict on the latest bar. When the above formula begins training you should see the following progress dialog box to tell you the progress of the computation: Calculate accuracy for the recent 100 bars Plot (res, _DEFAULT_NAME (), colorRed, styleLine ) Train and compute an adaptive neural network Set our desired output (One bar into the future) A better prediction would use other market indices and maybe economic data to get a more accurate prediction.
Note that this is a simple example meant only to demonstrate how the adaptive neural networks work.
The following AFL demonstrates how the adaptive neural networks can be used to predict the closing price of a stock one bar ahead.
#AMIBROKER FILE EXAMPLES DOWNLOAD#
Download the following example of a leading RSI indicator created with the toolbox and try it out for yourself: With the WiseTrader toolbox you can easily turn lagging indicators into smooth leading indicators. The neural networks are accessible via some simple AFL function calls and come with complete documentation to get you started. The WiseTrader toolbox also comes with two different learning algorithms: standard momentum back-propagation and a more advanced adaptive quick-propagation learning algorithm with faster convergence.
The adaptive walk-forward version which retrains on each new bar. The traditional neural networks that are trained on a fixed number of bars 2. The WiseTrader toolbox adds two different kinds of neural networks to the Amibroker platform: 1. Coupled with Amibroker's powerful formula language you can now create intelligent trading systems powered by advanced neural networks. The WiseTrader toolbox adds advanced neural network predictive technology to the Amibroker platform.