Clean Basic Martingale Strategy Required

工作已完成

执行时间1 一天
客户反馈
Developer understands and works very quickly. Very impressed

指定

Hi


I want a very CLEAN BASIC Martingale code as follows:

A - INPUTS

1. Initial Lots

2. Lots for Positions 2 to 5

3. Lots for Positions 6 to 10

4. Distance in points to open Position 2 to 5 (from each previous position price) 

5. Distance in points to open Position 6 to 10 (from each previous position price)

6. Dropdown for "Sell Only", "Buy Only", "Buy and Sell at the same time"

7. Take Profit in points (not pips)


B - WORKINGS

1. It must always trade. First trades must always be either a buy, sell or both depending on input selected

2. Then it must Martingale from there as per the inputs. It must always place the next order as a pending order in the system. As it triggers, the next pending order goes in and so on.

3. VERY IMPORTANT - The EA must continuously recalculate the average cost of all buy and sell positions separately (Total cost/Total lots for "buy" = average cost for "BUY") and  (Total cost/Total lots for "sell" = average cost for "SELL")

4. The take profit in points added to the average price of "SELL" and "BUY" must be sent as a pending order immediately - BUY positions and SELL positions separately.

5. Once BUY or SELL positions gets closed with take profit, it must immediately open either a buy or sell again and start over.


C-  EXAMPLE

Buy EURUSD at 1.09000 for 1 lots with 100 points take profit and 100 points distance to Martingale (Assume all trades at 1 lot and 100 distance BUT obviously it must work as per the inputs I mentioned above where it will be different for trades 2 to 5 and 6 to 10)

1. EA Immediately puts 1.09100 as TP order and another pending buy order at 1.08900

2. Price goes down to 1.08900 the EA opens another BUY as per the pending order. The EA now immediately puts another buy at 1.08800. At the same time the EA also now recalculates the two open positions cost which is ((1.09000x1) +(1.08900x1))/2 = 1.08950. The EA deletes the previous TP (1.09100) in the system and updates it to 1.09050 (1.08950 new average cost plus 100)

3. Price goes down to 1.08800 the EA opens another BUY as per the pending order. The EA now immediately puts another buy at 1.08700. At the same time the EA also now recalculates the three open positions cost which is ((1.0900x1) +(1.08900x1)+(1.08800x1))/3 = 1.08900. The EA deletes the previous TP (1.09050) in the system and updates it to 1.0900 (1.08900 new average cost plus 100)

4. Price goes to 1.0900 and take profit kicks in. EA immediately starts again.

5. The same principles applies for SELL trades (If I selected buy and sell at the same time)



反馈

1
开发者 1
等级
(20)
项目
19
11%
仲裁
2
50% / 50%
逾期
0
空闲
2
开发者 2
等级
(37)
项目
59
27%
仲裁
25
20% / 52%
逾期
10
17%
工作中
3
开发者 3
等级
(5)
项目
6
17%
仲裁
0
逾期
0
工作中
4
开发者 4
等级
(63)
项目
99
29%
仲裁
1
100% / 0%
逾期
2
2%
空闲
5
开发者 5
等级
(56)
项目
82
54%
仲裁
9
33% / 33%
逾期
7
9%
工作中
6
开发者 6
等级
(183)
项目
234
59%
仲裁
7
29% / 29%
逾期
8
3%
工作中
7
开发者 7
等级
(321)
项目
349
52%
仲裁
5
80% / 20%
逾期
1
0%
工作中
相似订单
So i have copier EA. The idea is the EA will triggered through manual OP by user via mobile or whatever platform. Let's say 0.01 lot to trigger it. After the EA takes master's position, the EA will be standby mode. If the master take more OP, the EA still not take the master's position (OP) until the user input manually once again via mobile for another 0.01 lot. Since this is a MT4 EA, Whenever user want to close
I need someone to develop an EA for MT5 to address the following issue: I trade using Local Trade Copier and have had problems with several of my receiver accounts. Sometimes, these accounts do not open the same number of positions, or they open double positions. So, I need an EA that can identify and show me which positions are not matching the positions opened on the master account (transmitter). Additionally
preciso de um robô com duas médias móveis, uma exponencial high e uma exponencial low. preciso também ter a opção de utilizar e todos os tempos gráficos e alterar os parâmetros das médias. entrada de compra será feita quando um candle de alta romper e fechar a cima da média high e fechará a posição quando um candle de baixa romper e fechar a baixo da média low. a venda será feita quando o candle de baixa romper e
Description - An expert advisor(s), placing sell trades in EUR/USD, based on the close price of the previous two candles, as shown in the figure below. The trades would be made in the 5 minute, 1 hour, and 1 day timeframes. In the 5 minute and 1 hour timeframes the market orders would be placed at the start of a new candle, at specific times EST. The order would be cancelled at the close of that candle, i.e after 5
Greetings, As the title suggests, I am trying to convert an indicator that calls itself via an iCustom call like this. iMAArray_Buffer[loop_1] = iCustom ( NULL , Selected_TF, MQLInfoString ( MQL_PROGRAM_NAME ), "calculate" , RPeriod, MType, MPeriod, 1 , shift); Full code will not be provided, only the position that needs fixing. I cannot get this working in MQL5 but the original code runs smoothly in MQL4. Please
Hi, I have an indicator from my friend, I want to copy it to my own Traidingview or MT5 can you do that for me. Here is the link
Hi, I have an indicator from my friend, I want to copy it to my own Traidingview or MT5 can you do that for me. Here is the link
Greetings great developer, I am in search of a highly skilled developer to assist with an exciting project. I need to convert two open-source TradingView indicators to NinjaTrader 8 and implement a usage restriction based on computer IDs. If you have experience with NinjaTrader 8 coding please let me know. I’d be happy to discuss the details further
Greetings great developer, I am in search of a highly skilled MQL5 developer to assist with an exciting project. I need to convert two open-source TradingView indicators to NinjaTrader 8 and implement a usage restriction based on computer IDs. If you have experience with NinjaTrader 8 coding please let me know. I’d be happy to discuss the details further
Hi, I need a robot, which wil get instructions to trade in 3 symbols at the same time based on few parameters and calculations. Example: There is 1 symbol called Gold-Near and the rate for it is 1000-1002 If i specify that when the rate reaches 1050, it should sell 1 lot Upon execution it will have to sell 1 lot of cme gold, buy 3 lots of mcx gold and buy currently (lots will be based on calculation). All the

项目信息

预算
30+ USD
开发人员
27 USD