Modify existing EA to use iCustom

전문가

작업 종료됨

실행 시간 4 일
피고용인의 피드백
It is easy to work

명시

The job is to code a new trade logic to this well structured and well functioning EA. The original EA is using a moving average crossover to trigger trade signals, and features multiple individual settings.

In short I want the moving average trade logic removed and use my own simple trade logic from a custom indicator, Complex_Pairs1_M. This is a crossover strategy as well: when the indicator signal line crosses its own SMA a trade signal is given. A few additions to the EA is needed as well.

Detailed specification:

1) Use the EA Generic MA Crossover Version 2 [TD] as basis for the final solution.
2) Delete external parameters for the original moving averages (iMA).
3) Add the indicator Complex_Pairs1_M as iCustom, so it follows the trade-logics below.
4) Add the indicator parameter periodSMA as external integer.
5) Add a "stoplossbuffer" as external double. This parameter sets the minimum distance required (0.0001 as default) between signal line and SMA to trigger a stop loss.
6) Add "useCloseBuyLogic/CloseSellLogic" as external booleen value.
7) Add "ClosePositions on Friday" before market close as external booleen value.
8) Add "DoNotTradeSundays" as external booleen value. Trades must only be placed Monday-Friday GMT when true.
9) Make sure that the EA can only have one open trade for each currency pair.
 
The EA must be able to follow the trade-logics below:

double dSignalLineShift2, dSignalLineShift1, dSignalLineShift0, dSmaShift2, dSmaShift1, dSmaShift0;

OpenBuyLogic: Open long when signal line of custom indicator is crossing its own SMA to the upside.
if( (dSignalLineShift2<=dSmaShift2) && (dSignalLineShift1>=dSmaShift1) && (dSignalLineShift0>dSmaShift0))

CloseBuyLogic: Close long when signal line touches back below SMA.
if( ((dSignalLineShift0 + StopLossBuffer) < dSmaShift0) || or StopLoss(pipvalue) is triggered).
OpenSellLogic: Open short when signal line of custom indicator is crossing its own SMA to the downside.
if( (dSignalLineShift2>=dSmaShift2) && (dSignalLineShift1<dSmaShift1) && (dSignalLineShift0<dSmaShift0))
CloseSellLogic:  Close short when signal line touches back above SMA.
if( ((dSignalLineShift0 - StopLossBuffer) > dSmaShift0) || or StopLoss(pipvalue) is triggered).

I have pasted an explanation to the EA from forexfactory below.
 
Thanks,

Tomas
 
______________
http://www.forexfactory.com/showthread.php?t=211654
The most classic of any trading system, is the humble MA crossover. It is tick-database enabled.

 

extern string Remark1 = "== Main Settings ==";
extern int MagicNumber = 0;
This number should be unique when multiple EAs are attached to a terminal.
extern bool SignalsOnly = False;
If set to true, the EA will only alert you to a trade using any combination of the alerts below.
extern bool Alerts = False;
If set to true, the EA will send a pop-up alert when a trading signal arrives.
extern bool SignalMail = False;
If set to true, the EA will send you an e-mail (assuming you set up your mail in your MT4 Terminal.) when a trading signal arrives.
extern bool PlaySounds = False;
If set to true, the EA will play the file, "alerts.wav" when a trading signal arrives.
extern bool ECNBroker = False;
Some brokers require EAs to first place a trade, and then modify the trade with the stoploss and takeprofit. If your broker requires this, set this value to True.
extern bool TickDatabase = True;
If set to True, the EA will send tick data into the tick database.
extern bool CloseOnOppositeSignal = True;
If set to true, the EA will close a trade if an opposite trading signal appears.
extern bool EachTickMode = True;
If set to true, the EA will take a trade immediately if it sees a signal. If set to false, the EA will take a trade only if there is a signal at the end of the bar.
extern double Lots = 0;
Fixed lot size
extern bool MoneyManagement = False;
Enables/Disables the lot sizing function.
extern int Risk = 0;
The percent of your available margin that you are willing to put into a trade.
extern int Slippage = 5;
Maximum slippage allowed when placing an order.
extern bool UseStopLoss = True;
Enables/Disables the stoploss
extern int StopLoss = 100;
Hard Stoploss in pips.
extern bool UseTakeProfit = False;
Enables/Disables the takeprofit
extern int TakeProfit = 60;
Hard take profit in pips.
extern bool UseTrailingStop = False;
Enables/Disables the trailingstop
extern int TrailingStop = 30;
Trailing stop in pips. Note, the EA will only trail profits.
extern bool MoveStopOnce = False;
Enables/disables the move-to-breakeven function.
extern int MoveStopWhenPrice = 50;
Trigger price to move the stoploss.
extern int MoveStopTo = 1;
Price in pips relative to breakeven to move the stoploss to once the trigger price is hit.
Using these values as an example, the EA will move the stoploss to breakeven + 1 if the trade hits 50 pips profit.
extern string Remark2 = "";
extern string Remark3 = "== MA1 Settings ==";
extern int MA1Period = 0;
Period of the Fast MA
extern int MA1Shift = 0;
Shift of the Fast MA
extern int MA1Method = 0
Method of the Fast MA;
0 = SMA
1 = EMA
2 = SMMA
3 = LWMA
extern int MA1Price = 0;
Price of the Fast MA
0 = Close
1 = Open
2 = High
3 = Low
4 = Median
5 = Typical
6 = Weighted
extern int MA1CrossBuffer = 0;
The number of pips above or below MA2 in order to trigger a trade. This is designed to prevent some whiplash and false entries.
extern string Remark4 = "";
extern string Remark5 = "== MA2 Settings ==";
extern int MA2Period = 0;
Period of the Slow MA
extern int MA2Shift = 0;
Shift of the Slow MA
extern int MA2Method = 0;
Method of the Slow MA;
0 = SMA
1 = EMA
2 = SMMA
3 = LWMA
extern int MA2Price = 0;
Price of the Slow MA
0 = Close
1 = Open
2 = High
3 = Low
4 = Median
5 = Typical
6 = Weighted
Note: You can enable all of the stoploss options if you so choose, just keep in mind that the EA will use the tightest stoploss available to it.

응답함

1
개발자 1
등급
(473)
프로젝트
1138
44%
중재
51
31% / 33%
기한 초과
500
44%
무료
2
개발자 2
등급
(71)
프로젝트
254
53%
중재
16
50% / 38%
기한 초과
83
33%
무료
3
개발자 3
등급
(30)
프로젝트
71
18%
중재
9
22% / 67%
기한 초과
15
21%
무료
게재됨: 2 코드
비슷한 주문
want an aggressive scalping Expert Advisor (EA) for XAUUSD (Gold) on M1 timeframe with the following features: ✅ Uses a combination of EMA, RSI, and ATR for entry signals. ✅ Recovery Mode to increase lot size on confirmed setups to recover losses safely. ✅ Trailing Stop functionality with adjustable start and step parameters. ✅ Stop trading after daily target or daily loss limit is reached. ✅ Money Management (fixed
Plataforma Meta Trader 5 Apertura sesión de Londres. 2 horas de operativa diaria. Índices, especialmente DAX40. Marco temporal de 5 minutos. Apertura automática de operaciones con cierre automático en TP o SL. Operaciones tanto en compra como en venta. Se pueden tomar todas las operaciones posibles, pero no 2 operaciones a la vez, es decir se tiene que cerrar una operación para abrir otra. Si hay una operación
I want a simple expert Advisor based on macd and ema with patial profit taking based on risk to reward, breakeven also based on risk to reward and trailing also based on risk to reward. stoploss will mostly be placed on candlestick low but instances where there has been a series of candlestick lows, it will be placed on the furthest candlestick low. new trade will be opened when current trade is at breakeven
Contact me only if you can handle my project. I'm looking for a custom MT4 or MT5 server setup that looks and feels exactly like a live trading account but gives me full control over the environment. CONTACT ME IF YOU CAN HANDLE THIS TYPE OF PROJECT ONLY
Hi, I’m looking for an experienced MQL5 developer to replicate an Expert Advisor I currently use for Forex. I don’t have the source code, but I do have all the input settings, behavior structure, and detailed backtesting of how the system should operate. ✅ Basic features the EA should include: Entry logic based on simple technical indicators (e.g., moving average). Take Profit and Stop Loss system using ratios (e.g
i need a developer to code my smc concept only experienced traders contact us we need to finish the job in a short period of time its a simple smc concept all you need is to apply the entry model which i explain to you thank you
I want you to build an Expert Advisor (EA) that mirrors trades between two accounts in opposite directions , maintaining identical TP and SL distances in pips with adjustable lot sizes. The EA logic is as follows: ✅ Core Requirements • EA monitors trades opened on Account A . • When a trade is opened on Account A: • An opposite direction trade is opened on Account B . • The TP and SL distances (in pips) are
Hi, I need an EA for both MT4 and MT5 that pushes JSON data to an API. It needs to push all trade history data, plus the opened trades. It needs to push all account data (including leverage, account type etc), and for trades, it needs to push all the relevant information (open/close time and price, direction, tp/sl levels if set, swap, commission, magic, comment, ticket, etc.) It will send data on the follwing
I’m looking for a custom MT4 or MT5 server setup that looks and feels exactly like a live trading account but gives me full control over the environment. What I need: • A private MT4/MT5 server that connects to the official MT4/MT5 desktop terminal • Live market price feed (real-time quotes for realism) • Ability to: • Create and manage accounts • Set or change balance, equity, margin • Manually add/edit/close trades
Create a ZigZag indicator, which is constructed based on extreme values determined using oscillators. It can use any classical normalized oscillator, which has overbought and oversold zones. The algorithm should first be executed with the WPR indicator, then similarly add the possibility to draw a zigzag using the following indicators

프로젝트 정보

예산
40- USD
기한
 3 일