Need Help with adding additional functions to this EA

Job finished

Execution time 6 days
Feedback from customer
GOOD JOB
Feedback from employee
I enjoyed working on the Project. The work ahead is explained properly. Very patient to explain gray areas around the project. Highly Recommend. Will love to work with Again 🙌🏾

Specification

I want to add

  • Maximum trades per day
  • trailing stops
  • close partials
  • Break even 

I want to be able to manually set how much trades to be taken on each day Eg:

  • Monday 2 trades     
  • Tuesday 3 trades
  • Wednesday 4 trades
  • Thursday 3 trades
  • Friday 2 trades

I also want to be able to manually set a time when each trade are taken on each day Eg:

  • Monday          2 trades      10:00am
  • Tuesday         3 trades        05:00am
  • Wednesday    4 trades         07:00pm
  • Thursday       3 trades          03:00pm
  • Friday           2 trades          01:00pm


CODE TO BE EDITED

//+------------------------------------------------------------------+

//|                                                      ProjectName |

//|                                      Copyright 2020, CompanyName |

//|                                       http://www.companyname.net |

//+------------------------------------------------------------------+


#property copyright "Copyright 2023, MetaQuotes Ltd."

#property link      "https://www.mql5.com"

#property version   "1.00"

#include <Trade\Trade.mqh>

CTrade trade;



//DYNAMIC LOTSIZING INPUT

double PositionSize(){

double lot;

double lot_min = SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MIN);

double lot_max = SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_MAX);

double AcctEquity = AccountInfoDouble(ACCOUNT_EQUITY);


lot = 3.00/50*AcctEquity;

if(lot<=lot_min){

lot=lot_min;

}

if(lot>=lot_max){

lot=lot_max;

}

return(lot);

}




//static input long inpMagicnumber =54321;

input int inpBars=20; //bars for high/low

static input double inpLots=1.00;

input int inpStopLoss=400;

input int inpTakeProfit=1500;



///GLOBAL VARIBLES

double high=0;

double low=0;

MqlTick currentTick, previousTick;


//+------------------------------------------------------------------+

//|                                                                  |

//+------------------------------------------------------------------+




datetime Expire_Time = D'2024.01.15 12:59:00';

int OnInit()

  {



 trade.SetExpertMagicNumber(5243);

        if(TimeCurrent() > Expire_Time)

        {

         Alert("The EA has expired...");

         ExpertRemove();

        }

        


  

//set magicnumber

//trade.SetExpertMagicNumber(inpMagicnumber);


   return(INIT_SUCCEEDED);

  }



//+------------------------------------------------------------------+

//|                                                                  |

//+------------------------------------------------------------------+

void OnDeinit(const int reason)

  {


  }

//+------------------------------------------------------------------+

//|                                                                  |

//+------------------------------------------------------------------+11                                                                                                                                                                                                                                    11 11111111111111111111111111111111111111111111111111

void OnTick()

  {

   double Lotsize = NormalizeDouble(PositionSize(),2); 

  //Get tick

  previousTick=currentTick;

  if(!SymbolInfoTick(_Symbol,currentTick)){Print("fail to get currenttick");return;}

  

  ///count open positions

  int cntBuy, cntSell;

  if(!CountOpenPositions(cntBuy,cntSell)){return;}

  

  //check for buy position

  if(cntBuy==0 && high!=0 && previousTick.ask>high && currentTick.ask<=high){

  

  

  

  // calculte stoploss /take profit

  double sl=inpStopLoss==0?0:currentTick.ask+inpStopLoss*_Point;

  double tp=inpTakeProfit==0?0:currentTick.ask-inpTakeProfit*_Point;

  if(!NormalizePrice(sl)){return;}

  if(!NormalizePrice(tp)){return;}

  

  trade.PositionOpen(_Symbol,ORDER_TYPE_SELL,Lotsize,currentTick.ask,sl,tp,"highbreakout");

  

  }

  

  

   //check for sell position

 if(cntSell==0 && low!=0 && previousTick.bid>low && currentTick.bid<=low){

  

  // calculte stoploss /take profit

  double sl=inpStopLoss==0?0:currentTick.ask+inpStopLoss*_Point;

  double tp=inpTakeProfit==0?0:currentTick.ask-inpTakeProfit*_Point;

  if(!NormalizePrice(sl)){return;}

  if(!NormalizePrice(tp)){return;}

  

  trade.PositionOpen(_Symbol,ORDER_TYPE_SELL,Lotsize,currentTick.bid,sl,tp,"highbreakout");

  

  Print("open sell position");

  }

  

  

  

  

//CALCULATE HIGH AND LOW

   high =iHigh(_Symbol,PERIOD_CURRENT,iHighest(_Symbol,PERIOD_CURRENT,MODE_HIGH,inpBars,0));

   low =iLow(_Symbol,PERIOD_CURRENT,iLowest(_Symbol,PERIOD_CURRENT,MODE_LOW,inpBars,0));

  // DrawObjects();

}

void DrawObjects(){

 


datetime time =iTime(_Symbol,PERIOD_CURRENT,inpBars);


//RESISTANCE/HIGH LEVELS

ObjectDelete(NULL,"high");

ObjectCreate(NULL,"high",OBJ_TREND,0,time,high,TimeCurrent(),high);

ObjectSetInteger(NULL,"high",OBJPROP_WIDTH,2);

ObjectSetInteger(NULL,"high",OBJPROP_COLOR,clrBlack);


//SUPPORTS/LOW LEVELS

ObjectDelete(NULL,"low");

ObjectCreate(NULL,"low",OBJ_TREND,0,time,low,TimeCurrent(),low);

ObjectSetInteger(NULL,"low",OBJPROP_COLOR,clrRed);


}


 bool CountOpenPositions(int &cntBuy,int &cntSell){

ObjectSetInteger(NULL,"low",OBJPROP_WIDTH,2);

  

  cntBuy=0;

  cntSell=0;

  int total= PositionsTotal();

  for (int i=total-1; i>=0; i--){

  ulong ticket = PositionGetTicket(1);

  if(ticket<=0){Print("failed to get position ticket");return false;}

  if(!PositionSelectByTicket(ticket)){Print("failed to select position");return false;}

  long magic;

  if(!PositionGetInteger(POSITION_MAGIC,magic)){Print("failed to get position magicnumber");return false;}

  if(magic==5243){

  long type;

  if(!PositionGetInteger(POSITION_TYPE,type)){Print("failed to get position type");return false;}

  if(type==POSITION_TYPE_BUY){cntBuy++;}

  if(type==POSITION_TYPE_SELL){cntSell++;}

  }

  }

  return true;

  }

  

//Normalize price

bool NormalizePrice(double &price){

double tickSize=0;

if(!SymbolInfoDouble(_Symbol,SYMBOL_TRADE_TICK_SIZE,tickSize)){

Print("failed to get tick size");

}

return true;



price= NormalizeDouble(MathRound(price/tickSize)*tickSize,_Digits);

return true;


}











Responded

1
Developer 1
Rating
(131)
Projects
152
22%
Arbitration
5
0% / 60%
Overdue
4
3%
Loaded
2
Developer 2
Rating
(196)
Projects
318
35%
Arbitration
64
13% / 56%
Overdue
82
26%
Free
3
Developer 3
Rating
(21)
Projects
24
38%
Arbitration
1
100% / 0%
Overdue
2
8%
Working
4
Developer 4
Rating
(1)
Projects
5
0%
Arbitration
1
100% / 0%
Overdue
2
40%
Free
5
Developer 5
Rating
(9)
Projects
12
0%
Arbitration
0
Overdue
1
8%
Free
6
Developer 6
Rating
(9)
Projects
8
38%
Arbitration
2
0% / 0%
Overdue
2
25%
Loaded
7
Developer 7
Rating
(130)
Projects
184
32%
Arbitration
16
31% / 63%
Overdue
27
15%
Working
8
Developer 8
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
9
Developer 9
Rating
(61)
Projects
93
27%
Arbitration
1
100% / 0%
Overdue
2
2%
Loaded
10
Developer 10
Rating
(194)
Projects
198
27%
Arbitration
0
Overdue
3
2%
Free
11
Developer 11
Rating
(54)
Projects
61
31%
Arbitration
2
0% / 0%
Overdue
0
Working
12
Developer 12
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
13
Developer 13
Rating
(96)
Projects
143
76%
Arbitration
0
Overdue
2
1%
Free
14
Developer 14
Rating
(66)
Projects
143
34%
Arbitration
10
10% / 60%
Overdue
26
18%
Free
Similar orders
STI EA 30 USD
I need to convert this MT4 indicator into MT5 EA/indicator. The problem is I only have the .ex4 file bt not .mq4 file and it is also a repainting indicator. I need preliminary assessment if the conversion can be done based on .ex4 file first before exploring the EA details further. Attached is the indicator Budget below is just indicative for the assessment. We can discuss further once the conversion can be done and
This mql4 got entry blue line and exit red line and pips inside also calculated it uses haiken Ashi and murray Math settings if you this you up for this job let's discuss it we will talk more when you are chosen thanks in advance
i Want to convert this Trading View Code to Mt4 Indicator indicator("NEOM Smart Money Concepts ", "NEOM Smart Money Concepts " , overlay = true , max_labels_count = 500 , max_lines_count = 500 , max_boxes_count = 500 , max_bars_back = 500) //-----------------------------------------------------------------------------{ //Constants //-----------------------------------------------------------------------------{ color
Hello Amazing developer am looking for profitable EA for mt4 and made for some past year and i will be looking forward for your bid if you have mt4 EA let Negotiate in the contact box best regards
Hello Amazing developer am looking for profitable EA for mt4 and made for some past year and i will be looking forward for your bid if you have mt4 EA let negotitate in the contact box best regartds
Hi I need a software like Mirror trade copier ( https://www.antonnel.net/mirror/ ) which directly connect to the Accounts over api with out MT4 terminal and copies trades from mater to client. I want the same and possible improvement like can be accessed over a url and dashboard for some basic metrics (optional)
The first section will describe the EAs trading strategy logic and features. The second section is an outline of the inputs that the EA should contain. 1. The idea of the trading system is as follows : This EA enters trades based on fibonacci retracement levels when other (MACD, RSI) conditions are met. It will use a MACD from a particular time frame to establish the swing high and swing lows which the fibonacci
1. **Timeframe and Liquidity:** Focus on the 5-minute timeframe for liquidity analysis.(timeframe for liquidity should be editble) 2. **Candlestick MSS:** Monitor 1-minute candlestick patterns for entry signals.(should be editble) 3. **Swing Points:** Identify swing points using the high and low of the last three candles.(ict swimg high and low) 4. **Sell Setup:** - Wait for a 5-minute candle to take out the swing
Hello great developer Can you build this indicator for Quantower. If positive, then how much will it cost to make automated strategy from the indicator? i will be looking for great developer to build for this project best regards
Hello Greetings. I have a custom tradingview strategy I would like to convert to Metatrader 5 ( mt5 ) . I have the source code a and with me. Kindly bid if it is what you can do for me and let discuss about the project. Thanks

Project information

Budget
30+ USD
For the developer
27 USD
Deadline
from 1 to 10 day(s)