Expert Advisors and Automated Trading - page 447

I was trying to execute only one EA per _Symbol, i tried mutex and winapi, but that was very ugly... Asking to MQL5 support they report me this interesting condition: FileOpen when not used with shared write or shared read will open file with exclusive lock, including the FILE_COMMON flag you...
Does anyone know where I can get an EA/ utility for mT4 that will allow me to average into a trade. So for example I want to enter a trade with a 50pip stop, I enter the first market order, then the EA/ utility enter another one for me at -30 pips, the stop for both is set at -50 pips. Does this...
#property copyright "Copyright 2015, MetaQuotes Software Corp."#property link "https://www.mql5.com"#property version "1.00"static long hisTickVolume[]; void OnTick() {    GetHistoricoQtdeNegocio();  }void GetHistoricoQtdeNegocio() { string opcaoOperar =...
  MT4 CCI Bug?  (2)
Hi, Is it me or have I discovered a bug with the CCI calculation in MetaTrader 4? I'm using this EA code... //+------------------------------------------------------------------+//| TestCCI.mq4 |//|...
Hello, I have a struggle to read the buffers from a custom indicator. Stange is that I get it to work in an indicator without problems, but when I try to read the value in the EA I get always an EMPTY_VALUE or 2147483647 Any help appreciated. Thanks.
Hallo, I've a problem with freezing strategy tester. When I run optimization strategy tester running few hours (20-30h) and then freezes. On the chart optimization appears  "swoosh" typical for this situation (in attach). In the log is not registered no errors. Please, does anyone know...
Hello, When compiling I have the error "possible loss of data due to type conversion" i suspect it is because of the variable type which the price is being stored in. Any help is greatly appreciated. Here's the code: (by the way I know it doesn't do anything I'm just looking for a solution to the...
Hey guys, i was wondering if below is possible. I have 2 EA's which should work in conjunction to each other, EA 1 (for Binary) and EA 2 (for Forex). EA 2 is an exact copy of EA 1, the only difference is whenever EA 1 opens Call (buy) order, EA 2 should opens the opposite, and vice versa. Both EA
Hey guys, Sorry if this is a dumb question, but I've been struggling for a while. I want to include this indicator: https://www.mql5.com/en/code/679 in my EA. I want to get the value it calculates in as a double in my EA, so that I can use it as part of my trading strategy . I have been able to use
  Invalid lots  (2)
Hello, Could anyone please show how to solve in experts file 'invalid lots amount for order send function'? Please advise. Much appreciated. 
I will like to do an EA to mirror how I trade and please I am not looking to purchase an EA off the shelf even if it makes money. I see that all developers have excellent reviews and that is a good starting point. I am not looking to make a career out of coding, as there are people who are better...
[Deleted]
research for so many years, finally i was done with it, but in mql4, i had try to transform to mql5, but the result seem so bad compare to this. so i need someone to transform it into mql5.
Dear all I am running an EA on a Strategy tester on MT4 and it runs okay but it doesn't executes any trades. I get an error message like this below: 2015.06.04 22:55:31.858 1993.09.21 23:00 Stark_EA_prototype AUDUSD,M30: OrderSend error 131 2015.06.04 22:55:28.017 1993.09.14 23:00...
[Deleted]
Hello forum, good day. Is it possible to iterate a for loop in both directions from a certain point in it until certain criteria is met? For example, lets say that I have a condition inside a for loop where a Moving Average meets criteria at bar 16. At this moment, I assign the value of the Moving
Hi, What is the code if I want to put one buystop order and one sellstop order for any open trades that I opened manually (or by another EA)? I trade multiple currency pairs so I need an EA that just sit on my MT4, wait for any open trades (any symbol), then add/open the pending orders....
Suppose I have subscribed for a signal provider and Signal provider is trading with 1 lot. I wan't to know the method of calculating the lot size to which will be traded in my account. Please check the attached image.
Hello All. I'm new here so I apologize if this question has asked but here it goes... I'm trying to figure out if I there is a way I can grab the past values of EMA or MACD using candlesticks as an increment. Or would it be easy to build an array and store the values real time
I need a help this this situation. How this buy (an sell's take profit) could be executed at the bid price?
Good afternoon, I'd like to know how to convert an online chart to an offline chart using a script. I need to do that because I'm connected to the Internet through a cell phone and the traffic is limited to a few GBs. I have a lot of open charts but only a few have open or pending orders. The...
Hello to you all, Maybe I am barking at the wrong tree but: is there already a tradingrobot with the megafxprofit indicator or is it possible to build such a robot? Hope to hear from someone. Regards, Theo
Hello! I created a news database in excel with all the news listed in FF Calendar since 2007. I need it becouse I need an EA to access date and time of the news, to study the past reaction of prices to some news. The problem is matching times: I buit my database in GMT, sounded like the best option
Can we use global variables into virtual hosting? Are they active there?
  Virtual server  (2)
Have the "Auto Trading" button on or of. my EA started to take dubble trades when I started to use virtual server
Hi! I downloaded Order Risk Management EA, but when I press the sell or buy buttons it does nothing. Can you help me in this matter? Thanks
Can any one kindly teach me how build perfect INDICATOR? i will appreciate this alot 
Hello guys i have small problem with stop loss.My EA robot use it good but i doesnt see it on platform. Here is Stop loss (Stopper) code : } total = CountTrades(); AveragePrice = 0; double Count = 0; for (cnt = OrdersTotal() - 1; cnt >= 0; cnt--) { OrderSelect(cnt,...
I'm new to MetaTrader, and am looking for a hosted platform that supports auto-trading and strategy development/testing/optimization of futures (CME, CBOT, etc) in an IB account. - Can MetaTrader and the hosted MQL service be used for this? I realize it's popular for Forex, but not sure if the...
Hi guys, I would like to ask, if there is any possibility of my EA being able to access webpage without including wininet. According to my information I need to copy wininet into my experts folder, I would like to find a way around this. Therfore any way for the EA to find wininet by itself would...
I need to close the pending order, when is activated reverse pending order - Active OP_BUY activates the close OP_SELLSTOP and vice versa. How to define this condition? for(p = 0; p< OrdersTotal(); p ++) if (OrderSelect(p, SELECT_BY_POS, MODE_TRADES)==true &amp;&amp;...