Работа завершена
Время выполнения 3 часа
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Отзыв от заказчика
Super job very professional
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Отзыв от исполнителя
Thanks!!!!!
Техническое задание
Hello, I need the size of my lots increases when my second orders opens and my third. and when I close all my orders manually it starts again from the beginning. like a martingale. example:I enter the value 0.01 lots for the first order. 0.02 for the second order and 0.05 for the third order. When my expert is active he opens an order at (example) 1.3542 and what I would like is that when a stoploss or takeprofit is hit he opens the second order at 0.02 lots and when my takeprofit or stoploss is hit he opens a third order at 0.05 lots. and if I close everything manually, everything starts from the beginning 0.01 lots then 0.02 lots then 0.05 lots ect.....
//+------------------------------------------------------------------+ //| test35.mq4 | //| xxx | //| http://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "xxx" #property link "http://www.mql5.com" #property version "1.00" #property strict extern double lots = 0.01; input int TakeProfit = 20; input int StopLoss = 10; extern int magic = 111112; extern double Level = 1.3441; extern double MaxDeviation = 9; // Max Deviation, points bool RunOnce=false; int last_order_check = false; datetime EaStartTime=TimeCurrent(); double takeprofit=TakeProfit; double stoploss =StopLoss; //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { RunOnce=false; MathSrand(GetTickCount()); if(Digits==5 || Digits==3) { takeprofit =TakeProfit*10; stoploss =StopLoss*10; } return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnTimer() { OnTick(); } void OnDeinit(const int reason) { //--- } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { if(IsLastOrderClose()) { OnInit(); Print("Ea Closed Manually "); EaStartTime=TimeCurrent(); } int ticet; int t=MathRand(); if(CountVsego()==0) { if(t>16384) { if(RunOnce || (Ask >=Level && Ask<=Level+(MaxDeviation*_Point) && Level !=0)) { ticet=OrderSend(Symbol(),OP_BUY,lots,Ask,3,Bid-stoploss*Point,Ask+takeprofit*Point,"1",magic,0,clrGreen); if(ticet>0) { RunOnce=true; } } } else if(t<16384) { if(RunOnce || (Bid <=Level && Bid >= Level-(MaxDeviation*_Point) && Level !=0)) { ticet=OrderSend(Symbol(),OP_SELL,lots,Bid,3,Ask+stoploss*Point,Bid-takeprofit*Point,"1",magic,0,clrRed); if(ticet>0) { RunOnce=true; } } } } } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int CountSELL() { int count=0; int i; for(i=OrdersTotal()-1;i>=0;i--) { if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) { if(OrderSymbol()==Symbol() && OrderMagicNumber()==magic && OrderType()==OP_SELL) count++; } } return(count); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int CountBUY() { int count=0; int i; for(i=OrdersTotal()-1;i>=0;i--) { if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) { if(OrderSymbol()==Symbol() && OrderMagicNumber()==magic && OrderType()==OP_BUY) count++; } } return(count); } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int CountVsego() { int Vsego; Vsego=CountBUY()+CountSELL(); return(Vsego); } //+------------------------------------------------------------------+ bool IsLastOrderClose() { bool signal = false; for(int i=OrdersHistoryTotal()-1;i>=0;i--) { bool select = OrderSelect(i,SELECT_BY_POS,MODE_HISTORY); if(select && OrderSymbol()==_Symbol && OrderMagicNumber()==magic) { if(OrderType()==OP_BUY && OrderCloseTime()>=EaStartTime) { if(OrderClosePrice()>OrderStopLoss() && OrderClosePrice()<OrderTakeProfit()) { signal = true; } break; } else if(OrderType()==OP_SELL && OrderCloseTime()>=EaStartTime) { if(OrderClosePrice()<OrderStopLoss() && OrderClosePrice()>OrderTakeProfit()) { signal = true; } break; } break; } } return(signal); }
Откликнулись
1
Оценка
Проекты
504
40%
Арбитраж
147
18%
/
72%
Просрочено
98
19%
Занят
2
Оценка
Проекты
3042
66%
Арбитраж
77
48%
/
14%
Просрочено
340
11%
Работает
3
Оценка
Проекты
789
71%
Арбитраж
9
33%
/
33%
Просрочено
22
3%
Свободен
4
Оценка
Проекты
1429
62%
Арбитраж
21
57%
/
10%
Просрочено
43
3%
Свободен
5
Оценка
Проекты
339
49%
Арбитраж
21
5%
/
33%
Просрочено
24
7%
Свободен
6
Оценка
Проекты
200
28%
Арбитраж
0
Просрочено
3
2%
Работает
7
Оценка
Проекты
589
70%
Арбитраж
14
43%
/
7%
Просрочено
28
5%
Свободен
8
Оценка
Проекты
825
73%
Арбитраж
15
53%
/
13%
Просрочено
193
23%
Работает
9
Оценка
Проекты
2
0%
Арбитраж
0
Просрочено
1
50%
Свободен
10
Оценка
Проекты
72
49%
Арбитраж
4
0%
/
50%
Просрочено
19
26%
Свободен
11
Оценка
Проекты
1047
49%
Арбитраж
39
28%
/
41%
Просрочено
49
5%
Свободен
12
Оценка
Проекты
135
42%
Арбитраж
19
16%
/
53%
Просрочено
20
15%
Загружен
Похожие заказы
Modify MQL5 EA for some new logics
30 - 100 USD
I have an EA and want to add few new logic to fetch profit taking factors and other values from an external master data and use it in existing EA
Solution for hacked crypto wallet
30 - 50 USD
My trust wallet was hacked and I have tokens to claim which unlock almost daily but the person who hacked the wallet drains the tokens as soon as I claim them in the hacked wallet. I have contacted the support for that crypto but they were not helpful. There is no way to claim this crypto to another wallet. I need a bot or another solution that can transfer the crypto out of the hacked wallet into my other wallet as
Boulē’s Full Margin Trader
30 - 50 USD
I want a program that will help calculate and enter the market on full margin for me. I just need to put in the price for entry, Stop loss and TP then it will calculate the lot sizes for entering the trade on full margin on Mt5
Design me a website like this...
30 - 200 USD
I want to design a website like https://www.ngnrates.com/ we will change some stuff but not much, if you can deliver a website like this let me know your budget and readiness to implement
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
Need a devoloper for( personal)
30+ USD
I have a full code ,, There are some errors in this.It does not add to the chart, does not show arrow marks, does not alert ,, fix this problem and work properly,, Contact on telegram @Gw_rakib1
Hey, great developer I have a thinkorswim script I want to convert it into TradingView. Can you please let me know if you can i will be looking for great developer that will bid for it best regards
Hey, great developer I have a thinkorswim script I want to convert it into TradingView. Can you please let me know if you can i will be looking for great developer that will bid for it best regards
Tradingview developer
30 - 35 USD
Hey greetings. I am in need of tradingview developer that can modify an open source PineScript indicator code to add additional features. Kindly bid for this project if it is what you handle and let proceed with the project
Tradingview Pine script strategy to mt4/mt5 EA
30 - 50 USD
hi. I hv a strategy on tradingview need to convert to MT4/MT5 expert advisor for algo trading. would like to add some tradingview strategy setting to the EA(not included in my tradingview code): recalculate after order is filled, order size: xx% of equity
Информация о проекте
Бюджет
40+ USD
VAT (20%):
8
USD
Итого:
48
USD
Исполнителю
36
USD
Сроки выполнения
до 10 дн.