MyLanguage
Strategies can be written in MyLanguage, which is compatible with most of the syntax, instructions and functions of Wenhua MyLanguage. It breaks complex algorithms into functions and describes trading logic with a concise syntax and a library of financial functions.
Example strategy: a system based on displaced Bollinger Bands
mylang
M := 12; // Parameter range 1, 20
N := 3; // Parameter range 1, 10
SDEV := 2; // Parameter range 1, 10
P := 16; // Parameter range 1, 20
// A trend-following strategy for larger periods such as daily K-lines.
// This model is only an example of model development; trade on it at your own risk.
////////////////////////////////////////////////////////
// Displaced BOLL channel calculation
MID:=MA(C,N); // Calculate middle band
TMP:=STD(C,M)*SDEV; // Calculate standard deviation
DISPTOP:=REF(MID,P)+TMP; // Displaced BOLL channel upper band
DISPBOTTOM:=REF(MID,P)-TMP; // Displaced BOLL channel lower band
// System entry
H>=DISPTOP,BPK;
L<=DISPBOTTOM,SPK;
AUTOFILTER;