WiseTrader Toolbox

Function Reference

This page lists every function the toolbox adds to AmiBroker, grouped by what it does. Each name links to its own page, where you'll find the full signature, the parameters, and an example. If you just want to find a function quickly, start here.

Note

The signature on each function's own page is the authoritative one. A few functions take an optional Engine argument that selects the cycle estimator — see Cycle Engines for what the engine numbers mean.

Pattern & trendline scanners

These scan a chart for classic patterns or draw lines automatically. See Pattern Exploration for the bigger picture.

FunctionWhat it does
AutoTrendlineDetects swing points and draws trendlines on the chart automatically.
AutoSupportFinds horizontal support and resistance levels from price.
AutoPivotsMarks swing pivot highs and lows.
FindFibRetracementFinds the most recent swing and projects its Fibonacci retracement levels.
FindGartleyScans for the Gartley harmonic pattern.
FindHeadAndShouldersScans for the head-and-shoulders pattern.
FindDoublePatternScans for double tops and double bottoms.

Variable-period indicators

These are the usual indicators, but their lookback period can change from bar to bar — feed them a period array (for example from DominantCycle) to make them adaptive. See the Adaptive Indicators overview.

FunctionWhat it does
VariablePeriodEMAExponential moving average with a per-bar period.
VariablePeriodWildersMAWilder's smoothing average with a per-bar period.
VariablePeriodRSIRSI with a per-bar period.
VariablePeriodCCICCI with a per-bar period.
VariablePeriodMFIMoney Flow Index with a per-bar period.
VariablePeriodCMOChande Momentum Oscillator with a per-bar period.
VariablePeriodFastStochasticFast stochastic %K with a per-bar period.
VariablePeriodWilliamsRWilliams %R with a per-bar period.
VariablePeriodTrixTRIX with a per-bar period.
VariablePeriodDMIDirectional movement (DI+, DI− and ADX) with a per-bar period.
VariablePeriodATRAverage True Range with a per-bar period.
VariablePeriodStDevStandard deviation with a per-bar period.
VariablePeriodRefLike AFL's Ref(), but the number of bars back can vary each bar.
VariablePeriodHHVHighest high over a per-bar lookback.
VariablePeriodLLVLowest low over a per-bar lookback.
VariablePeriodSumRunning sum over a per-bar lookback.

Cycle & signal-processing

These treat price as a signal and measure its cycles. Several accept an optional Engine argument — see Digital Signal Processing and Cycle Engines.

FunctionWhat it does
DominantCycleEstimates the dominant cycle period at each bar (engine-selectable).
HilbertPeriodDominant cycle period via the Hilbert transform.
CyberCycleEhlers' Cyber Cycle oscillator.
MAMAMESA Adaptive Moving Average (returns the MAMA and FAMA lines).
SineWaveSine and lead-sine of the cycle phase, for turning points (engine-selectable).
HilbertOscillatorOscillator of the cycle component of price (engine-selectable).
InstantTrendlineEhlers' instantaneous trendline, a low-lag trend line (engine-selectable).
SignalNoiseRatioCycle signal-to-noise ratio, in decibels.
EnhancedSignalNoiseRatioSpectral signal-to-noise ratio (engine-selectable).
PolynomialInterpolationSmooths price by fitting a polynomial over a lookback.
GoertzelScans the frequency spectrum and can project cycles forward.
EndPointFFTEnd-point FFT frequency filter that does not repaint.

Pivots & levels

FunctionWhat it does
PivotPointReturns the price of a numbered swing pivot.
PivotPointBarReturns the bar index of a numbered swing pivot.
PercentDifferenceThe percentage difference between two values.

System rotation

Rotate between two and seven trading systems, staying in whichever has been strongest over a lookback. See System Rotation.

FunctionWhat it does
RotateSignals2RotateSignals7Rank 2–7 systems by recent performance and trade only the leader. The number sets how many systems you pass in.

Neural networks

The network functions come in two styles: fixed-arity calls where you pass the inputs directly (the numbered families), and multi-input calls where you build the input set up first. The full workflow is on the Neural Network Functions page.

FunctionWhat it does
TrainNeuralNetwork3TrainNeuralNetwork10Train a network on the given inputs and one output, then save it to a file. The number is the total argument count.
RunNeuralNetwork3RunNeuralNetwork10Load a saved network and run it over the given inputs to produce a prediction.
NeuralNetworkIndicator3NeuralNetworkIndicator20Train-and-plot helper that runs a network straight onto a chart, with a lookback for walk-forward.
AddNeuralNetworkInputAdds one input to the set used by the multi-input train/run functions.
AddNeuralNetworkOutputSets the output (target) for the multi-input functions.
AddNeuralNetworkAmplifyRepeats (amplifies) chosen inputs so the network weights them more.
ClearNeuralNetworkInputsClears the accumulated inputs so you can start a fresh set.
TrainMultiInputNeuralNetworkTrains a network using the inputs you added — any number, no fixed arity.
RunMultiInputNeuralNetworkRuns a saved network using the inputs you added.

Network configuration

Before training, you shape the network and the training run with a family of Set… calls (plus a few Enable…/Disable… toggles). Every one of these is listed, with its values, on the Settings Reference. They are grouped across these pages:

TopicSettings
ArchitectureSetNeuralNetworkType (0 MLP, 1 LSTM, 2 GRU, 3 TCN, 4 Transformer), SetRecurrentParams, SetNetworkLayer1…4, SetNetworkWithActivationLayer1…4.
TCN, Transformer & advancedSetTcnParams, SetTransformerParams, SetEnsembleSize, SetLayerNorm, SetCategoricalInput.
Training algorithmSetLearningAlgorithm, SetLearningRate, SetMomentum, SetSarpropTemperature, SetBatchSize, SetMaximumEpochs, the learning-rate schedule and optimizer setters (SetLearningRateSchedule, SetLRScheduleStep, SetLRStepDecayFactor, SetLRScheduleMinPercent, SetSGDRCycleMultiplier, SetAdamBeta1/2, SetAdamEpsilon, SetAdamWeightDecay, SetRMSPropDecay, SetAdadeltaRho, SetAdadeltaEpsilon), and EnableShuffleData/DisableShuffleData.
Input & output scalingSetScalingAlgorithm, SetInputScalingMinMax, SetOutputScalingMinMax.
Accuracy & overfittingSetPercentTestingData, SetEarlyStoppingPatience, SetDropoutRate, SetWeightInit, SetGradientClipNorm, SetErrorAlgorithm, SetHuberDelta.
HousekeepingSetSeed, SetVersion, SetMaximumThreads, RestoreDefaults, EnableProgress/DisableProgress, EnableNetworkToAFL/DisableNetworkToAFL.