Auftrag beendet
Spezifikation
I would like the ability of my MA based EA to enter/exit the trade of the symbol chart (ex. EURUSD) it is dropped to, which it does now and in addition, to do the following:
1) enter/exit at the exact same time the open/close trades of default chart (EURUSD) for symbols that I custom input.
2) Add ATR based stop loss for each added symbol
3) Add ATR based take profit for each added symbol
4) Add ATR based partial take profit for each added symbol
So if the moving average gives a buy signal on EURUSD, the default chart of the EA, it will take a buy signal on symbol1 and sell signal on symbol2 (if set to reverse, such as USDCAD) and when moving average reverses to short, it will give a short signal on symbol1 and a buy signal on symobl2, and so forth for all symmbols, up to 10 symbols.
When it outputs a buy or short for symmbol1 or symbol2, they will be given their own ATR based stop loss, take profit and partial take profit, as inputed in the custom variables below.
symbol1 = GBPUSD;
symbol1-rev = false; // revserse feature, off, same direction as default chart
symbol1-stopATR = true;
symbol1-stopATRmult = 9; // atr stop multiplier
symbol1-proiftATR = true;
symbol1-profitATRmult = 9; // atr take profit multiplier
symbol1-partialprofit = true;
symbol1-partialATRMult = 5; // atr partial profit multiplier
symbol1-ATRpartiallotsize = 50; // percent of lots to close with partial
symbol2 = USDCAD;
symbol2-rev = true; // revserse feature, on, so when EA detects that EURUSD enters long, then it enters short on USDCAD and vice versa
symbol2-stopATR = true;
symbol2-stopATRmult = 9; // atr stop multiplier
symbol2-proiftATR = true;
symbol2-profitATRmult = 9; // atr take profit multiplier
symbol2-partialprofit = true;
symbol2-partialATRMult = 5; // atr partial profit multiplier
symbol2-ATRpartiallotsize = 50; // percent of lots to close with partial
same for up to 10 symbols
Note: I aleady have the following ATR based stop, take profit and partial profit for my EA as follows:
extern string _group_8_ = "+++";
extern bool stoplossATR = true; //
extern int stopATRlen = 45; //
extern double stopATRMult = 9; //
extern int MinSL = 10;
extern int MaxSL = 230;
extern string _group_9_ = "+++";
extern bool takeprofitATR = true; //
extern bool takeprofitSATR = true; //
extern int profitATRlen = 25; //
extern double profitATRMult = 12; //
extern double profitSATRMult = 19;
extern int MinTP = 10;
extern int MaxTP = 0;
extern string _group_10_0 = "+++";
extern bool takePartialprofitATR = true; //
extern int profitPartialtime = 60;
extern int profitPartialATRlen = 25; //
extern int partialATRMult = 14;
extern int MinPartialTP = 10;
extern int MaxPartialTP = 0;
extern double ATRpartiallotsize = 50;
The new symbols will inherit the default chart's values of period, stopATRlen, MinSL, MaxSL, profitATRlen, MinTP, MaxTP, profitpartialATRlen, MinPartialTP, MaxPartialTP.
I'm only interested in manipulating the mulitplier of ATR based stop, take profit and partial take profit.
I'll share my EA in the comments.