Expert Advisors and Automated Trading - page 251

Hello dear developers, I have this code below: The Array " SymbolsROC " store the roc of the symbols(in double) stated on the function " WeakAndStrongCurrency() ". what I want is to select the first 2 highest values and the last 2 lowest values in the array without changing the index of the array
Hey, I'm currently working on an EA, for that I need a Moving Average from a certain Indicator value. For that I used the iMA function, but now I am facing a problem that I have not yet bee able to solve. The indicator returns two values in the data window and the specific indicator window which I
The strategy tester allows for "Model: Open prices only" in MT4/MT5, however its baked into the tester. I need this added to my EA's such that after my rules are met, then each buy/sell order is opened at/with the next new candle open, such that with each order is submitted for execution starting
Hello, Is there a way to sort the backtest optimizer by the win rate percent. I cant use custom max as I'm optimizing for an ea I dont have the source code for. My end goal is the find a setting where over the last 3 months, it has had a high profit as well as over the last overall 10 years of
Hi For the last 1 Year i code with MQL4 Now i want to move to MQL5 and i found it very hard There is any guide to explain how to move from MQL4 to MQL5
I want to run the back test for all the Symbol together because i want to know which drawdwon or profit i will get if all work together there is a way to run a back test on MQL4 for more than a one symbol and timeframe simultaneity ? Or maybe at MQL5 there is a way ? (my EA at MQL4 but if i will
Hi, I wonder if it is possible to use an FPGA as the hardware for OpenCL. I was looking for some board of the Altera Cyclone series: http://www.altera.com/devices/fpga/cyclone-v-fpgas/cyv-index.jsp, because of the Altera's SDK for OpenCL
Since the EA i'm writing will be used only on forex pairs, should I check the SymbolInfoInteger(SYMBOL_TRADE_CALC_MODE) ? 1. is this SymbolInfoInteger(SYMBOL_TRADE_CALC_MODE), a reliable checkup to be sure if EA is activated on a forex pair (and not on OIL and other stuff) ? and I have added the...
hi Which way is more efectiv to run the EA If I have a EA that work on 10 symbol 1. Open 10 chart for each symbol and run the EA on each one ? 2. Open 1 chart and run the EA with a loop for all the Symbol ? im afraid that the EA will not be fast enough to run all the symbol in 1 tick and i gonna
Hi, I am trying to find the way how to delay my function CloseAll (closing all orders) before it will execute. So once EA see profit it should pause for couple seconds (let say for 10 sec) and after CloseAll will take place. here is my part of EA. Could you please advise what to add ? double
Hi, I understand that there are cycle operators to keep the EA going back till the condition laid becomes true. But i would like to know like there is “continue” or “break” to break from the cycle operator. Same way is there any operator which sends the operation back to first line of the code from
Hi! I've been writing a code but its getting loong, i cant find a way to make it smaller, i need candle[1] to be different than all candles between [2] and [9] (just an example). How do i do that without having to write candle[1] != candle[2] &&... one by one? if (candle[ 1 ] != candle[ 2 ] &&
Hello, I actually have some questions about the "book" variable in MQL5 (If we declare MqlBookInfo book[] for example). I was programming some Experts for @MES future contract (Micro E mini S&P 500). My broker was only offering me the informations about volume from book[0] to book[19] So 0 was
Hi, I am trying to code a Multi-Symbol function and I need some help with it. I have given the pairs an option like this one: input bool Trade_Pair1 = 0 ; // Trade input ENUM_SYMBOLS Pair1 = GBPUSD; // Pair input bool Trade_Pair2 = 0 ; // Trade input ENUM_SYMBOLS Pair2 = GBPUSD; //
Hi, I would like to just get the value of a custom indicator in an Expert Advisor, here is my code : double   IndicatorBuffer[]; int      HandleIndicator = 0;int OnInit(){   HandleIndicator = iCustom(Symbol(),PERIOD_CURRENT,"MAindicator","EURUSD",PERIOD_CURRENT);      Print("iCustom HANDLE...
So I followed this tutorial Step-By-Step Guide to writing an Expert Advisor in MQL5 for Beginners - MQL5 Articles But I made things a little different and stupid just to test, but still, I can't send order, why? GetError function keeps returning error:4753 (position not found). Eeverything seems to
hey mql5 community, i need the tickchart data for backtesting. unfortunately my broker no longer has them available for this period. has one of you saved it for the following periods: DAX 20.02-20.03 / 13.10-10.11 many thanks
I subscribed to a signal yesterday and have set everything up as advised (including increasing the spread tolerance) but the new trades are not being copied. Anyone have a checklist i can use to ensure all the right boxes have been ticked? Thanks
I am running two different EA's that both work on the same Fx pair and the same time frame (gbp-usd M5). When one of the EA's is actiavted... the SL and TP show up on both chart windows. It says which EA placed the trade, but how can I be sure this is accurate? And how do I know that the SL and TP
Question: Does terminal.exe return an exit code other than 0? Description: I'm using python to automate optimizations. An optimization will fail, for example, when none of the parameters are selected for optimization. The journal gives this message: 2018.01 . 24 10 : 58 : 52.653 Tester no optimized
Can anyone point me in the right direction please re what journal entries mean? such as 'account in investor mode' and 'activated' just repeating itself non stop? thanks
I'm performing optimization on MT5 Strategy Tester using H4 Open Prices Only. It's obvious my data is not accurate, as the number of ticks isn't the same for all 28 pairs which are read on every tick. I printed the iTime for each bar for all 28 pairs on the same line from June 2020 to December 2020
  Start time, end time  (15   1 2)
Hi guys, I've had a problem. I've written EA, solved nearly all the problems. However I want it start trade from some hour to other: <code removed, see below post> It writes: 'return' - 'void' function returns a value. I'm picking in it a week and don't have a clue what to do with it. Could you help...
Is there any way to know if the EA is running on Strategy Tester? My EA uses the symbolInfo.MarginMaintenance() to make some equations to trade but these values are zero in strategy tester. To work around this problem, I created a parameter to set the margin (to use in strategy tester only) and I...
Hi I want to transfert my EA from MQL4 to MQL5 i have code at MQL4 that not work at MQL5 double tickvalue=MarketInfo( NULL ,MODE_TICKVALUE); How can i wirte this at MQL5
My questions are really simple, it is about the standard library Experts + Trade classes mainly, hopefuly metaquotes devs can answer me. 1) How good/feature complete is the current implementation of the standard library in MT5? 2) How good is it at multiple instances of same EA on different charts
Hello everyone.. This is my first post,and English is not my native language,please pardon me.. I'm trying to build EA and it will have Take profit value based on trading session.. E.g if current hour is in Asian session it will set 10 pips and if it's in Europe session it will set to 15 pips.. Is
  E.A ALLIGATOR  (1)
I am looking for someone who can code an Alligator E.A Robot
From the image, I’ve marked the high of candle index (i) and low of candle index (i + 1). These candles are on the H1 chart. How can I search multiple lower timeframes within the two H1 candles to determine if there are similar consecutive candles that have the same price for the high and low as in
Hello, I would like to add a Trailling Take Profit for my trading robot. Quite simply, I open a position at $ 100 The StopLoss is at -20 $ If my position is at $ 180 (+80) then my TakeProfit will be at $ 200 and my StopLoss will be at $ 150 Regarding the StopLoss I have already managed to find a