Expert Advisors and Automated Trading - page 182

Hi I just figured out the way to properly test if orders were closed the right way, but i'm wondering if the code is correct (because it accounts for situations when there are requotes and I can't simulate that) and what could be done to improve the code ? thanks so much #define numRetriesOrder 5
With two trials to get the profit of the last closed position (Hedging account), I am not arriving anywhere. The first trial is personal, and it goes like this: //+------------------------------------------------------------------+//| Ask: MQL4...
The CopyTicks function does not copy the duplication of ticks. For example: the difference between two ticks are flags and date. In the first case, the flags are 14, and in the second case, the flags are 8. The time differs by 1000 milliseconds. Each tick is very important for my script because the
Hi There is a function to run my EA every second ( or millisecond) instade every tick
Good day, I am using an EA and its been using a 0.01 lot size, I need help in changing it to an automatic lot size
  Stop limit Order  (2)
hi im using the Function " MqlTradeRequest" if i want to send a pending order for stop limit between 100-100.2 how can i do is ? i tried the " ORDER_TYPE_BUY_LIMIT " But its diffenete from what i want its make the price active if the price go above the stop_limit price its ok to put stop order with
Hi, I reported this issue already one year ago to MetaQuotes but never got a helpful response. Sometimes - don´t ask me when - a simple execution of functions like iClose(), iTime() or CopyRates(), CopyTime() whatever takes more than 30 seconds until the code-pointer returns. And of course, when you...
Hi all, I am trying to send WebRequest in MQL5 to API via POST method. The request received at API end however, headers and data dont. following is my code: // JSON text to send string strJsonText = "{\r\n\"key\": \"value\"\r\n}" ; // Text must be converted to a uchar array. Note that
Hi It has happened a few times already in the last couple of weeks: My EA the VPS is not doing anything... I have a dozen EA on VPS that normally opens +100 positions on a daily basis, but for some reason sometimes it stops "working". Meaning that everything appears OK, but its just not doing
Hello, i don't understand why it's says "stop" when i believed that it has to say "sell" instead. Look in the column "Action" and "Type"
I have a live subscription for a VPS Server, but the VPS tab has gone back to displaying the screen promoting renting a VPS server, with over a month of the subscription remaining. As a result I have lost control of the VPS and I can't disengage the EAs that are running on the VPS, or update them
I am in demo mode but the bot trades until out of money or margin it does that in about 3 seconds, it will do about 50 trades and if i close them out it fills them back up again. please tell me how to stop this madness
Hello, I need create an EA to buy or sell, with lots option from an easy code attached. I want to know the way to start this code. Thanks
I trade in indan exchange . i use mt5 for algorithum trading however , i am having difficulties with backtesting . because , Trade function of mql 5 are not compatible with indian currency because as the backtesting setup for DEMO deposits and margins for backtesting are based on forex currency
Hi, I'm currently testing an EA on multiple currencies. For the most part, it works ok, but has big troubles with requotes. I've intentionally set deviation to 10000 points just to see if this will help, which isn't the case unfortunately. Here's the code I'm using (PositionerTrade = 1) is
Hi all, I'm looking for a solution, maybe someone knows about something... The ideal will be an EA that I can run everytime I open mt4. The EA then automatically checks a provided list of instruments if all the data (M1 to H4 for example) is up to date. The EA then downloads all new data from
I am willing to write a choppiness index function inside my expert to use it in the following way : if (chopIndex <= 40 ) { //Do the following } Using Pinescript on TradingView, I was able to simply do the following: length = input ( 14 , minval= 1 ) //Choppiness index formula ci = 100 * log10
Friends, I am experiencing a bit of a frustrating problem... probably simple but any advice appreciated. When running my custom indicator, the default window period (when the chart pops up) is always 1 hour. I change it within my OnInit function as follows: int OnInit () { // Set the chart
Hi, is it possible to capture the dragging process of a horizontal line somehow? I can get the CHARTEVENT_OBJECT_DRAG event but this event only fires when dragging is finished. I want to capture the dragging itself, like mouse-move that is updating x and y position of the mouse...
Hi, I have to search signals on an open group of symbols and when I try to retrieve MovingAverage value by iMA and subsequent call to CopyBuffer I have to wait a lot of time and sometimes happen an abnormal termination. Isthere an efficient way to retrieve moving average value of generic symbol? I
Hi all, I am an MT5 student and my PositionClose() has refused to work. I have tried various options and alternatives but failed and I decided to seek help. Please point to me what I could be doing wrong. Thank you. //+------------------------------------------------------------------+ //|
Hey all, I am coming up with a new system for an EA that implements martingale. Tp is 5 pips multiplier = 1.2 However, I am not sure when to apply the martingale. I do not wish to use the grid method! Thanks
Hello, i have the problem, that a just opened position by CTrade::Buy is not selectable PositionSelectByTicket (ticket) The position is opened, ret result is 10009. The ticket is valid but PositionSelectByTicket fails. Why ? Thank you
Does anybody have any solution for activating a given chart using its ID in MT5 using mql5? Suppose that we have 10 open charts in mt5 and we want to activate a given chart using its ID using an EA, what specific code can achieve that? I searched in the forum but found no solution for mt5
Hey guys . I am learning to code and i decided to code a small EA that places two pending orders (buy stop and sell stop) at yesterday's high and low . I menaged to code the part that places two pending orders. Instead I have difficulties understanding why the second part , that is simply supposed
Hello, since the last update, I am getting requote errors. I need to admit, I had some changes in the calculation of TP and SL values, but I cannot relate to the issue, I am facing currently. Am I missing something here
I deleted EA and he is still opening positions. I am using vps. I tested a few other EAs before and it was no problem. Does anyone know how to remove EA completely? greetings
Apparently using int count= CalendarCountries (countries); returns only countries which are relevant in the close future. The example returns only few countries: https://www.mql5.com/en/docs/calendar/calendarcountrybyid Does anyone know how to retrieve the complete list of ISO 3166-1 countries
Except the winning strategy/ setting, what features are basic requirements from users
Hi! I am trading binary options and need to optimize for just one goal: Win Rate (%). Nothing else matters. Has anyone created a custom optimization criteria for this, or would be willing to show me how to add this to my EA? Thanks 😊