Unisciti alla nostra fan page
This is a working singleton code example. The sole purpose of this post is to provide a working code sample of a singleton object. A singleton object is created when there 'can be only one' of the object. This is accomplished by making an object's constructor private, and ensuring assignment and copy operations are also private. I was working on an EA and identified that an object should never have more than one copy. I don't expect the EA to ever get large enough for it to actually matter that a singleton is used, but I like the clarity in the code for the object's type. The code follows closely the tutorial at http://www.yolinux.com/TUTORIALS/C++Singleton.html.
Two identical trading systems (for long and short deals) based on the ColorMaRsi-Trigger indicator signals that can be configured in different ways within a single EA with an ability to change the volume of a forthcoming trade depending on the results of the previous trades for this trading system.
The trading system based on SpearmanRankCorrelation_Histogram indicator signals
The Expert Advisor operates using pending Buy limit and Sell limit orders. It uses High and Low of the D1 timeframe (bars #1 and #2)
An Expert Advisor based on two iMA (Moving Average, MA) and iRSI (Relative Strength Index, RSI)
An Expert Advisor based on the iMA (Moving Average, MA) and iMACD (Moving Average Convergence/Divergence, MACD) indicators
Two identical trading systems (for long and short deals) based on the ColorMETRO indicator signals that can be configured in different ways within a single EA with an ability to change the volume of a forthcoming trade depending on the results of the previous trades for this trading system.
The strategy is based on two indicators calculated on two timeframes: iAO (Awesome Oscillator, AO) on the D1 TF and iStochastic (Stochastic Oscillator, Stoh) on H1.
Two identical trading systems (for long and short deals) based on the VortexIndicator indicator signals that can be configured in different ways within a single EA with an ability to change the volume of a forthcoming trade depending on the results of the previous trades for this trading system
RSI EA - trading based on overbought/oversold zones determined by the iRSI (Relative Strength Index, RSI) indicator.
Two identical trading systems (for long and short positions) based on the signals of the Slow-Stoch indicator, which can be configured in different ways within one Expert Advisor
An Expert Advisor based on the iMACD indicator (Moving Average Convergence/Divergence, MACD)
The EA implements averaging of positions. The average iStdDev is calculated in a sliding window.
An EA based on indicator iMA (Moving Average, MA). Reverse of signals. Lot size is either fixed or based on risk percentage.
A multisymbol EA. Its working algorithm is perceptron, i.e., a simple neural network). It uses indicator iAC (Acceleration/Deceleration, Accelerator/Decelerator Oscillator, AC).
Indicators iCCI (Commodity Channel Index, CCI) and two iMAs (Moving Average, MA) are used.
A swing-based Expert Advisor: The EA sets a pending stop order with an increased lot size and in the opposite direction.
An Expert Advisor based on iMA (Moving Average, MA) and iMACD (Moving Average Convergence/Divergence, MACD). Averaging positions, in case of a loss.