작업 종료됨
실행 시간 9 시간
고객의 피드백
recommended to anyone
피고용인의 피드백
Clear description, quick test. A pleasure this project.
명시
Create a Function that Returns the Maximum Drawdown for a Symbol and Side
NOTE:
- I am not looking for the Maximum Daily Drawdown, I am looking for the maximum drawdown for currently open trades of a referenced symbol and side.
- Function needs to work for multi symbols
Use this code to Count the Number of Trades for the Symbol & Side;
If number of Trades for the Symbol and side == 0 (then Maximum Drawdown is reset to Zero).
int NumberOfTrades(string symb, int OrderType) { int val=0; for (int cnt = 0; cnt < PositionsTotal(); cnt++) { if(!position.SelectByIndex(cnt)) { continue; } if(position. Symbol() != symb) continue; if(position.Symbol()== symb) if(position.PositionType() == OrderType) val++; } return (val); }
Potentially code to leverage (or use your own).
double CalculateMaxOpenDrawdown(string symbol, ENUM_ORDER_TYPE side) { // Define the variables to store drawdown information double maxDrawdown = 0.0; double dailyHigh = 0.0; double dailyLow = 0.0; int lastOrderDay = 0; // Iterate through open orders for (int i = 0; i < OrdersTotal(); i++) { // Get order ticket ulong ticket = OrderGetTicket(i); // Check if the order is for the specified symbol and side if (OrderGetString(ORDER_SYMBOL) == symbol && OrderGetInteger(ORDER_TYPE) == side) { // Get the order's open time and price datetime orderOpenTime = OrderGetInteger(ORDER_TIME_SETUP); double orderOpenPrice = OrderGetDouble(ORDER_PRICE_OPEN); // Extract the day from the order open time datetime serverTime = TimeCurrent(); // Use the current server time int orderDay = TimeDay(orderOpenTime); int currentDay = TimeDay(serverTime); // If the order day is different from the last order day, reset dailyHigh and dailyLow if (orderDay != lastOrderDay) { dailyHigh = orderOpenPrice; dailyLow = orderOpenPrice; lastOrderDay = orderDay; } // Update dailyHigh and dailyLow if necessary if (orderOpenPrice > dailyHigh) dailyHigh = orderOpenPrice; else if (orderOpenPrice < dailyLow) dailyLow = orderOpenPrice; // Calculate the drawdown for the current order double drawdown = side == OP_BUY ? (orderOpenPrice - dailyLow) : (dailyHigh - orderOpenPrice); // Update maxDrawdown if the current drawdown is greater if (drawdown > maxDrawdown) maxDrawdown = drawdown; } } return maxDrawdown; }
응답함
1
등급
프로젝트
80
6%
중재
46
11%
/
54%
기한 초과
7
9%
작업중
2
등급
프로젝트
19
16%
중재
3
67%
/
0%
기한 초과
0
무료
3
등급
프로젝트
369
33%
중재
34
41%
/
29%
기한 초과
108
29%
무료
게재됨: 1 코드
4
등급
프로젝트
566
26%
중재
24
42%
/
38%
기한 초과
85
15%
무료
게재됨: 6 코드
비슷한 주문
Hello, I am looking for an experienced MQL5 developer who can build a reliable choppy/range market filter for my existing EA. My EA works well in trending markets , but it takes too many losing trades during sideways, choppy, and ranging markets . I want an indicator/filter that can detect bad market conditions and pause or block EA entries during those periods. Main Requirement: Detect Trend / Range / Choppy market
Trend Filter BUY EMA 9 > EMA 21 > EMA 50 EMA 50 slope must be pointing upward. Price must remain above EMA 50. SELL EMA 9 < EMA 21 < EMA 50 EMA 50 slope must be pointing downward. Price must remain below EMA 50. Slope sensitivity should be adjustable in the EA settings. Entry Conditions Wait for a pullback toward EMA 9 or EMA 21. Entry only after a valid engulfing candle. BUY Previous candle bearish. Current candle
Kenyan Editor
30+ USD
1.a specific robot to earn for a quick and reasonable trade all over. The Idear of being specific makes me perfect, I want this to be clear that make me a high luxurious person will describe me and I will promise to advertise the market both internally and externally
NON STOP MARTINGALE TRADING BOT
250 - 1000 USD
I’m looking for an experienced developer who can build a Martingale trading bot . I’m willing to pay a fair price for the right developer. I have an example trading account that demonstrates exactly how I want the bot to operate. The strategy is simple: the bot trades continuously using a Martingale system. The only exception is that it should automatically pause trading during high-impact news events or periods of
I have my own strategy in 1min. I want it convert to a bot. Please reach me only coding experts. I dont want bit makers from Ai. Demo version should be provided for confirmation
Code the indicator to MT5 EA, include all the inputs variable and values Enable EA true or false Allow live trading Allow demo trading Allow strategy tester Bar shift 0 adjustable Lot size adjustable Max spread in points (0=disable) Use stop loss true or false Stop loss in points (adjustable) Use stop loss circle true or false Use take profit true or false Use take profit in points (adjustable) Use pending order in
Siraj Durrani
30 - 50 USD
Title: Need MT4 Expert Advisor for XAUUSD (SMC/ICT Strategy) Requirements: I need a professional MT4 Expert Advisor (EA) for XAUUSD based on Smart Money Concepts (SMC) / ICT strategy. Features: - Platform: MetaTrader 4 (MT4) - Symbol: XAUUSD - Automatic Buy and Sell trades. - Detect market trend automatically. - Use Break of Structure (BOS) and Change of Character (CHoCH) for trend confirmation. - Enter trades only
Xauusd to gold
35+ USD
The EA must be fully automated , backtest-friendly , prop-firm-safe , and built with a clean modular architecture . Core Strategy Requirements 1. Higher Timeframe Bias Use D1 and H4 . Use 200 EMA as trend filter: If price is above 200 EMA on both D1 and H4 -> allow BUY only If price is below 200 EMA on both D1 and H4 -> allow SELL only If D1 and H4 are not aligned -> no trade 2. Market Structure Module Detect and
Looking for an experienced MQL5 developer to build a professional, fully automated Multi-Timeframe trend-following Expert Advisor for MT5. The system is asset-agnostic (Forex, Gold, Indices, Crypto, and Deriv Synthetics). Core Technical Logic: Macro Trend (H4 & H1): Direction determined by Candle Close vs. EMA 200, and EMA 50 > EMA 200 crossover state. Market Structure Filter (H1): Algorithmic
Eagoldcent
30 - 200 USD
I need an MT4 & MT5 Expert Advisor for ALL pair support Cent Account. Features: Platform: MT4 & MT5 Pair: All Pair Account Type: Cent Account Buy and Sell Fixed Lot Start (user input) Lot Exponent / Multiplier (user input) PipStep / Grid Distance (user input) Take Profit (user input) Maximum Trades (user input) Magic Number (user input) Inputs: Start Lot = 0.01 Take Profit = 40 Lot Exponent = 1.50 PipStep = 40 Max
프로젝트 정보
예산
40+ USD
기한
로 1 일