Expert Advisors and Automated Trading - page 347

Hello all I have a question about the OnTimer(). If the OnTimer() should trigger while the EA is in Sleep() will the EA continue to Sleep() or will the OnTimer() function operate?
I noticed, with the strategy tester in fixed lot mode, that if I set a value for Signal_Expiration other than 4 it makes some operations with wrong volume. I used the wizard with different strategies and the error repeats itself. #include <Expert\Expert.mqh>//--- available signals#include...
  75% Candle body  (1)
HEy Guys, i am looking for the code for the following factor. i would like, that my ea can calc 75% of the candle body.  Does anybody has a solution?
Hi guy! My ea can't entry lot more than 0.10 in cent account but it's no problem in standart account. This problem only for 1st entry. What should I change in ea code. Some one please help me. Sorry for my english
Hi i have a problem with my vps, i'm using the vps provided by the mt4 (webzilla), i migrated everything, no errors in the journal, but when my laptop is off, vps doesn't open any trades. What should i do? Thx Luca
Helo everybody, I am looking for a solution for my EA. For that i have serveral horizontal lines at my chart. My EA should think, that every line has the parameters. Does anybody know a code for this? so for example : I say if Close is higher than X1 (horiontal line 1) and when the price decrease...
in Ontick, ordertype don't change when pending position become open.
Hello Guys, Anyone has RSI EA which opens order when RSI crossing 50 level
I'm creating an EA that is meant to be run in fullscreen mode (F11), but I would still like to display important messages from the Expert tab on the chart, more than just Print(message), since it's easy enough for me to duplicate those messages as Objects. Is there a buffer or command that someone
Does anyone know where to find EAs to trade candlestick patterns ???? thanks
I am trying to get values from Sin Fractal indicator which has the input parameters shown on the image. Below is the code I tried:       double sinFractal=iCustom(NULL,0,"Market\\SinFractal 7TF",         "",         2,         1.0,         "",         0,         PERIOD_M15,         PERIOD_M30...
HI, I'm looking for the "Best EA" in the marketplace for metatrader 4. I have got this requirements EURUSD as a minimum, Timeframe 5m to 4 H, High Profit factor. 2+, Low drawdown. Meaning no grid, Martingale etc, Can be ruin on a small account 100 USD. Not a must, You have great expirence yourself
Please with respect to the great coders of this forum, i need a code that will output the least/highest value of a given line indicators like Moving Average for like 20 bars back in a given period. just like the case of High[iHighest(NULL,0,MODE_HIGH,20,1)];
Hello Have this problem in MT5/MQL5 (64bit on W10 64bit) only (note: the same code works in MT4/MQL4 (32bit on W10 64bit)): I need to pass an array of handles to kernel32::WaitForMultipleObjects; the function is defined here
Today I have purchased my EA but installation is failed please help me
Hi to everyone, first of all, I'm sorry if my english or terminology could cause any misunderstanding, I will try to be as clear as possible. For an EA that I'm developing, I would like to cancel the StopLoss and replace it with a Trailing Stop when a Take Profit is reached. For example: EURUSD, 5...
HI guys I am applying a custom indicator on top of another custom indicator so the second one plots its values based on the values of the first. Both run on the secondary window. Is there a way to use the iCustom function to get the buffer values as the  calculation are based on an indicator values...
Hello, I'm new to trading, but with years of experience in programming. However, I can't understand some messages I get in journal. I got the code for the new bar from https://www.mql5.com/en/articles/159 Here's the code I'm testing, a simple EMA crossing script: #include <Trade\Trade.mqh>#define...
Hello everyone! In my EA i am plotting some objects on the chart to help me keep track of the decision making of the algorithm. In the strategy tester they show up just fine. Unfortunately the strategy tester is a bit limited when it comes to the possibility to analyze the results chart. For example...
  closing price  (3)
I want to show the closing price of the previous bar when it comes to the new bar And I'm using this code to do this, but it's a mistake void OnTick()  {double Open[];int count;   // number of elements to copyArraySetAsSeries(Open,true);CopyOpen(_Symbol,_Period,0,count,Open);...
Hi, I am testing an EA on 28 Pairs and my PC is new High End PC with 12 Core CPU and M.2 SSD up to 3GB Read Speed and 2 GB Write Speed, but I must wait many hours each time to finish the test, is there any way to make the process faster?   Best regards
Hi, I am trying to add a custom symbol, where I get data from REST API and feed them into the symbol. All is going ok except tick timestamp. look at the following code(bt is MqlTick that contains data from the REST API server):       tick[0].time=(datetime)bt.timestamp;       tick[0].time_msc=bt...
I am not sure what's going on at all and could use help. I am building an EA based off a custom indicator. I know the indicator is getting called properly now because it's displaying on the chart. However, I am getting no values. Here's the code I'm using: double stuff = iCustom(NULL,0,"MyIndicator"...
Hello traders and coders.I have been learning as much as i can as fast as i can. I know that anything and everything is possible. I am in a position now where i am financially struggling and really am trying to make some money quickly so that i am able to look after myself and my loved ones. I will...
Dear all, I would like to know how can I tell my EA to close the trade on (or after) MA crossover? So, when I have a buy order and 10EMA crosses below 20EMA I close the order. The problem here is that a lot of times the Fast EMA crosses below Slow EMA for just a second and then continues up. This...
Hi everyone, I have a problem with my mt4 EA. Basically it's designed to trade within a time window set by the user at startup (extern). extern datetime StartTime;          extern datetime EndTime;          bool IsTradingTime = false;//-----------------------------------if (TimeLocal() >= StartTime...
  ea pending order  (6)
hi, im editing an ea base on pending order buy stop and sell stop can someone pls help me with the error occurred which i cant identified. im not so good in coding. principles of this ea: 1) place buy and sell stop simultaneously for every minute 2) i can set TP and Sl manually i really appreaciate...
Hello, I have a problem with EA's. On demo account everyone are working fine - strategy tester and EA's live on charts, but on real account it doesn't trade on strategy tester and live. Anybody know what is the reason of that? I'm using this same configurations on both accounts. I tested that on...
Hallo, there are some things I do not understand on spreads. I'll put some things I've noticed with personal considerations, please feel free to correct or confirm them. Thank you. I'm considering the BTCUSD market with BTC between 10100 and 10300. With one broker I have around 80/100$ of spread...