MQL5
Эксперты
Статистика и математика
Панели и диалоги
Пользовательская графика
OpenCL
ALGLIB
C++
C#
JavaScript
PHP
MySQL
PostgreSQL
Python
Linux
RegExp
Фотошоп
Отладка робота/индикатора
Оптимизация стратегий
Модули стратегий
Сбор данных из интернета
Выгрузка данных на сайт
Forex
Stocks (акции)
Options (опционы)
Data mining (обработка данных)
Дизайн продуктов
Перевод текстов
Создание текстов
Техническое задание
double CalculateProfitOneLot(double entry_price,double exit_price) { double profit=0; if(!OrderCalcProfit(ORDER_TYPE_BUY,Symbol(),1.0,entry_price,exit_price,profit)) { Print(__FUNCTION__," Failed to calculate OrderCalcProfit(). Error ",GetLastError()); } return(profit); }
#define EXPERT_MAGIC 123456 // MagicNumber of the expert //+------------------------------------------------------------------+ //| Modification of pending orders | //+------------------------------------------------------------------+ void OnStart() { //--- declare and initialize the trade request and result of trade request MqlTradeRequest request={0}; MqlTradeResult result={0}; int total=OrdersTotal(); // total number of placed pending orders //--- iterate over all placed pending orders for(int i=0; i<total; i++) { //--- parameters of the order ulong order_ticket=OrderGetTicket(i); // order ticket string order_symbol=Symbol(); // symbol int digits=(int)SymbolInfoInteger(order_symbol,SYMBOL_DIGITS); // number of decimal places ulong magic=OrderGetInteger(ORDER_MAGIC); // MagicNumber of the order double volume=OrderGetDouble(ORDER_VOLUME_CURRENT); // current volume of the order double sl=OrderGetDouble(ORDER_SL); // current Stop Loss of the order double tp=OrderGetDouble(ORDER_TP); // current Take Profit of the order ENUM_ORDER_TYPE type=(ENUM_ORDER_TYPE)OrderGetInteger(ORDER_TYPE); // type of the order int offset = 50; // offset from the current price to place the order, in points double price; // order triggering price double point=SymbolInfoDouble(order_symbol,SYMBOL_POINT); // value of point //--- output information about the order PrintFormat("#%I64u %s %s %.2f %s sl: %s tp: %s [%I64d]", order_ticket, order_symbol, EnumToString(type), volume, DoubleToString(PositionGetDouble(POSITION_PRICE_OPEN),digits), DoubleToString(sl,digits), DoubleToString(tp,digits), magic); //--- if the MagicNumber matches, Stop Loss and Take Profit are not defined if(magic==EXPERT_MAGIC && sl==0 && tp==0) { request.action=TRADE_ACTION_MODIFY; // type of trade operation request.order = OrderGetTicket(i); // order ticket request.symbol =Symbol(); // symbol request.deviation=5; // allowed deviation from the price //--- setting the price level, Take Profit and Stop Loss of the order depending on its type if(type==ORDER_TYPE_BUY_LIMIT) { price = SymbolInfoDouble(Symbol(),SYMBOL_ASK)-offset*point; request.tp = NormalizeDouble(price+offset*point,digits); request.sl = NormalizeDouble(price-offset*point,digits); request.price =NormalizeDouble(price,digits); // normalized opening price } else if(type==ORDER_TYPE_SELL_LIMIT) { price = SymbolInfoDouble(Symbol(),SYMBOL_BID)+offset*point; request.tp = NormalizeDouble(price-offset*point,digits); request.sl = NormalizeDouble(price+offset*point,digits); request.price =NormalizeDouble(price,digits); // normalized opening price } else if(type==ORDER_TYPE_BUY_STOP) { price = SymbolInfoDouble(Symbol(),SYMBOL_BID)+offset*point; request.tp = NormalizeDouble(price+offset*point,digits); request.sl = NormalizeDouble(price-offset*point,digits); request.price =NormalizeDouble(price,digits); // normalized opening price } else if(type==ORDER_TYPE_SELL_STOP) { price = SymbolInfoDouble(Symbol(),SYMBOL_ASK)-offset*point; request.tp = NormalizeDouble(price-offset*point,digits); request.sl = NormalizeDouble(price+offset*point,digits); request.price =NormalizeDouble(price,digits); // normalized opening price } //--- send the request if(!OrderSend(request,result)) PrintFormat("OrderSend error %d",GetLastError()); // if unable to send the request, output the error code //--- information about the operation PrintFormat("retcode=%u deal=%I64u order=%I64u",result.retcode,result.deal,result.order); //--- zeroing the request and result values ZeroMemory(request); ZeroMemory(result); } } } //+------------------------------------------------------------------+
Откликнулись
1
Оценка
Проекты
12
25%
Арбитраж
1
0%
/
100%
Просрочено
0
Свободен
2
Оценка
Проекты
46
28%
Арбитраж
9
0%
/
100%
Просрочено
7
15%
Свободен
3
Оценка
Проекты
460
26%
Арбитраж
140
20%
/
59%
Просрочено
100
22%
Работает
4
Оценка
Проекты
1
100%
Арбитраж
0
Просрочено
0
Свободен
5
Оценка
Проекты
477
69%
Арбитраж
6
67%
/
0%
Просрочено
2
0%
Свободен
6
Оценка
Проекты
36
67%
Арбитраж
0
Просрочено
0
Свободен
7
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
8
Оценка
Проекты
3
67%
Арбитраж
1
0%
/
0%
Просрочено
0
Свободен
9
Оценка
Проекты
945
47%
Арбитраж
309
58%
/
27%
Просрочено
125
13%
Свободен
10
Оценка
Проекты
146
34%
Арбитраж
13
8%
/
62%
Просрочено
26
18%
Свободен
Опубликовал: 6 примеров
Похожие заказы
Ea modified and new ea design
850+ USD
The basic idea of CRO is to simulate coral colonies that develop and compete for space on a reef, ultimately forming an optimal structure. Each coral in the reef represents a potential solution to the optimization problem under consideration. The reef is modeled as a two-dimensional N×M grid. Each grid cell can either be occupied by a coral or left empty. A coral is a coded solution to an optimization problem. For
Mk
30+ USD
I need a fully automated trading robot designed to generate consistent profits while strictly controlling risk and minimizing losses. The robot should use a combination of strategies, including trend-following, scalping, and price action, and must be able to adapt to different market conditions such as trending and ranging markets. It should analyze the market using indicators like Moving Averages, RSI, MACD, and
1. IF price forms: - Higher highs + higher lows → TREND = BUY - Lower highs + lower lows → TREND = SELL ELSE → NO TRADE 2. IF: - Trend = BUY - Price retraces to support zone - Bullish engulfing candle forms - TDI green crosses above red (optional) THEN: - Execute BUY 3. IF: - Trend = SELL - Price retraces to resistance - Bearish engulfing forms - TDI confirms THEN: - Execute SELL 4. Risk per trade = 1% of account Lot
Информация о проекте
Бюджет
30 - 200 USD
Сроки выполнения
до 10 дн.