Expert Advisors and Automated Trading - page 44

To post a new topic, please log in or register
Hi, this piece of code , always leads to the same error. the ModifyReq is filled just as Trade.mqh is filling it before sending a modification order. // getting position data here.... symbol, TP, ticket...// and all values are checked.// pos_symbol != ""// long pos_ticket = PositionGetInteger...//...
Hello Everyone, So i am using the metaquotes VPS and i have multiple EAs running on multiple charts at the same time. My problem is whenever i want to add an EA with a new chart the server syncs all the information from my mt4 terminal which stops the currently working EAs and deletes all the...
Hello, I have this code for the Trailing Stop of my EA, and it is generating the "OrderModify error 1", can you help me to know what I am doing wrong please? int nbuy()  {   int b0=0;   for(int i=0;i<OrdersTotal();i++)     {      int a1=OrderSelect(i,SELECT_BY_POS...
  Limit volume (13   1 2)
Hello everyone I am having problems with limiting the volume of lots, I would like to know if you can help me please, this is the code to obtain the lot to invest: double GetLots ()   {    double lots = 0;    if (MM)      {       lots = NormalizeDouble (AccountFreeMargin () * Risk / 100 / 1000.0...
I have this code. I want TP to print either 500  or 1000 depending on  the random numbers generated, the problem is only  TP 1000 seems to be printed, I'm sure there is an easy way around this but cant figure it out. Please helint BAH= rand()%5+1; int TakeProfit2=0;  bool BAH2 = (1||2||3);  bool...
Hi all I'm having problem with iBANS indicator buffer. When I run my function it will run until my RAM memory reaches max and then it will return only 0.0 values from IBANDS indicator. Ones I stop function RAM is freed and and then when I start function again it will return normal values until RAM...
Hey guys I really need some help here to not go crazy. I got a MAcross files and a ADX file online and wanted to combine them. Opened a new file and basically copy past different bits and it didnt run. I edited the downloaded MAcross file with the same exact changes I added to my new file, and then...
Good Day guys I think this topic is one that more users can relate to. Let's say you download an EA but the developer didn't include a parameter to adjust SL or TP for example. So you wonder how profitable the EA would be with another SL or TP value… Where do you start? Go through the chart and...
  TBE EA (2)
Hello together, can someone help me with this EA? the problem is the the EA opening wrong position, because the real support or resistance disappear after the Price hit this... Can someone program thas the Price have to test this support or ressisten first and after this, if it nor disapper, opened...
i need help on my ea. it does not enter orders on another chart if there is any open order on mt4. e.g if there is order on eurusd, then ea will not open order on another chart like gbpusd or usdcad or anyother. i tried changing the magicnumber but it does not work. please any help will do
i'd like to have a will_spread  indicator running in an expert the willspread indicator has the sequent settings for SetIndexBuffer: IndicatorBuffers(4);    SetIndexBuffer(0, WillSpread);    SetIndexBuffer(1, Spread);    SetIndexBuffer(2, FastEMA);    SetIndexBuffer(3, SlowEMA); In my expert I use...
<Deleted> Does anyone have the  َArc.mq5 indicator?
Hello, I would like to get opened position price, ticket number and  it's commission and profit. What could be the issue in the code? Thanks in advance. //+------------------------------------------------------------------+//|                                     test_profitcommission_01.mq5...
  Candle Indication (45   1 2 3 4 5)
Hi All I am in the process of turning my trading system into an EA on mql4. I have written a candle indicator that the EA will use, the problem is my entry is on subsequent candles, either the next one to signal or the one after. I and looking for suggestions of how to look at 1st & 2nd candles...
please figure the problem out. thanks a lot. //+------------------------------------------------------------------+//|                                                       移动止盈止损.mq4 |//|                        Copyright 2018, MetaQuotes Software Corp....
Hello, when i call this function with a ticket of a pending order int check_ticket_status(ulong ticket){    if(OrderSelect( ticket,SELECT_BY_TICKET,MODE_TRADES) == true)    {         int otype=OrderType();         if(otype == OP_BUY || otype == OP_SELL)               Print("status filled");...
How to know where is the problem? This expert worked well on my MT4 before to migrate on MQL5 VPS.
Hi Everyone, i want to make a request from you guys, to make an expert adviser from this indicator, you all can check it on attachment, and for EA rule is : 1. buy or sell whenever the indicator arrow is showing, and close all trading that made before (whatever it profit or not). 2. Lot size 0.01 3....
Hi, I'm testing a robot that i have (ex5 file) and it's leaving the test when reach a time of the first day of test: What could be limiting it? Thanks!
Please see code below. I have written code that searches in real-timeALL available markets in MetaTrader and returns their lowest price from thelast 10 bars (1 hour period) as an Alert. It is working however the “Alert” results areshown individually for each market. I need ALL the results in ONE...
Fist of all thanks for any help I would like to know if is possible using result of previous pass on genetic otimization for the next generation,  For example, if I try to normalize the max Profit, I need to know the current max e min price, so f(x) = Profit/(Max(Profit)-Min(Profit)) How can I store...
Hello. I hope I'm able to make clear what i'm trying to find. Let's say I have a trade with take profit set to 15 points. I'd like to keep my trade open if it hits 15 AND keep going to 16, 17, 20... and ONLY close it if it moves one pip back. So, it hits 15, still open, hits 16, 17, 18 same thing,...
How to install Set Files provided by the author on EA for specific charts?
Hello, I created an EA that basically opens positions (in an alternate way (LONG & SHORT) with a Martingale behaviour. The problem is when, for all crosses in which the EA is applied there is a movement due to for example the increase of USD price). All EA open the last step of martingale and take...
Hello, I have an encrpyted .ex4 indicator that is for buy/sell signals. I'm wanting to be able to put that into an EA to open and close trades based on my rules for opening a trade. Is it at all possible to do if the .ex4 is encrypted?  Thank you in advance for any help!!!
Hello there. I have an indicator but I only have the ex4 file no mql. Is this possible to be turned into an automated system still? I've heard there possibly some software which can track the indicators being used. Or am I wasting my time? Before I put a request in to have it made Many thanks
I’ve been working on an MA cross EA. Fast SMA X slow EMA with trend WMA to dictate the direction of trade. It’s works, but DD is large and there a many bad trades. Has anyone got any experience with MA cross? What else have you had success with to help filter the bad trades? 
Hi everyone, I'm new to EA building and am coding some basic strategies to backtest. I'm trying to backtest a few years, on multiple timeframes. When I set the timeframe on Daily and try to backtest to Jan. 01, 2015, the code works perfectly. Then, when I set it to do the same on an hourly chart, it...
Hi everybodyI am trying to find one or more positions  among other positions by their comment or comments  assigned to them before, and close them if they are in certain amount of profit. I know relying on comment is not a safe way but I really need it for backtesting purposes not trading real money...
I tried to compile following code from: https://www.mql5.com/en/articles/260 There is a zip at bottom of the page. But I got compile error: 'NodeInfo' - conversion is not accessible because of inheritance access Elliott_wave_en.mq5 But If i change .Add(NodeInfo) to something like .Add(NodeInfo.Node)...