Expert Advisors and Automated Trading - page 34

To post a new topic, please log in or register
Hello, i have a problem with pendings orders in backtest, this is my code int OrdiniApertiPending() { ulong ticket; int Magic; int Totale=0; string type; int iOrders=OrdersTotal(), i; for(i=iOrders-1; i>=0; i--) { ticket=OrderGetTicket(i); if(ticket!=0)// if the order
hey everyone I have create multiple EAs for money management and they don't trigger any trade.and because of that, the website doesn't allow me to upload them as products . Can I get a tip? thank you
Hi, How can we get the market value of a symbol in stock market using MQL5 code? My broker is Mofid Securities (mofidsecurities-server). Or how can we can the number of shares of a symbol in the stock market. Thank you
Hello i need help, I have start the code of my ea, but i have one error "int start" already use. I see who i have 2 line int start, but by which I must replace the 2nd (i am novice) can one user send to me the correct syntaxe ? thank you int ccc = 123; int start () { if (AccountNumber ()! = ccc)
Martingale: The gambler doubles his bet after every loss... There are a few complicated Martingale math papers floating around and even those are mostly about roulette but I thought of a way to make a really simple math based presentation. First of all I am assuming the goal is to make as much...
Hi guys, I'm looking into the code of adding the economic calendar in an MQL5 EA. I would be interested in understanding how a code is built around, for example, not trading on the red days of the related currencies. I read through this, but I would like to see an sample code
Is there any function to return the day of the week of today? Like: Sunday, Monday, Tuesday
Hello! I am wondering how I can allow my script to work on multiple pairs. I know that scripts are limited to the pair you start them on, but there must be a way to automatically get the Symbol of a pair when you know which pair you want. E.G I know I want "EURUSD" but my graph is on "GBPUSD". I
Copybuffer takes up to 24hts to load daily ATR for my EA on new charts sometimes sometimes not....any ideas on how to avoid this
Hi I am having trouble with Parentheses. I know i should'nt but i can not figure out how to add a simple extra if statement. This code works int init(){if(60*EndHr+EndMn<=(60*StartHr+(StartMn+15))) { Print("invalid trading time"); return INIT_PARAMETERS_INCORRECT; } But this code throws up
Hi, Summary: I'm testing an EA in Strategy Tester (ST) that uses a custom DLL. If I stop the test before the test ends (either from Strategy Tester or MT5), I'm unable to start the test again unless I close the ST window first -- ie. clicking the "start" button in MT5's ST toolbar while the ST
//Place a pending order sell using a fixed amount of account risk (1)void SellPendingOrderWithRiskFixed2(){ double lotsize = MarketInfo(Symbol(),MODE_LOTSIZE) / AccountLeverage(); double pipsize = 1 * 10; double maxlots = AccountFreeMargin() / 100 * BalanceRiskPercent2 / lotsize *
Can anyone help? I purchased an EA...it installs fine on my stand-alone PC but when I try to install it (or activate or even see it) on my VPS running the same MT4 software I get the following error message: Line: 64 Char: 249 Error: Unable to get property 'title' of undefined or null reference
  Countdown (1)
Hello programmers! How can I set a countdown of, say 5 seconds that restarts when the value is equal to zero? I will appreciate your help please
Can someone help me add a local time filter to my EA? I want the EA to only look for trades in local time between something like 7:25 to 8:05. I can do it for hour only, but adding the minutes got me confused
Hi. My ea has been deleted on my computer but is still trading on the server. If I synchronize with the server, I think it is only computer to server. That is one way only. Is this correct? If it is only one way, how do I download from the server? Thanks in advance. regards Trevor
Hello world, I'm somewhat new to mql5 and forex automation in general. Recently I have been brushing up on c++ for the purpose of developing my own EA. I would greatly appreciate it if someone could provide me with a link to the source code of a working EMA cross strategy. My goal is to enter trades
Few years ago EA worked perfectly, now EA dont take first trade if I put it on. If I put EA to scalp (1M timeframe, about entry every 10 minutes) then it works fine. On normal timefrime, 1H where it suppose to work took last month 1 trade out of 10. I have tested settings, spread, MA on/off, changed
Since build 2280 I cannot migrate any EAs to MQL5 VPS server. On the VPS tab I click MIGRATE, and I get a message saying "MiGRATION SUCCESSFUL", but the EA attached to the chart does not migrate. In the VPS journal, I can see a message "Expert xxxx removed" (see attached image). Anyone else having
Hello folks, I think it is very easy, but I'm a begginer in MQL5 programming. I would like to return the sum of periods of the following formula. n = Number of periods TimeFrame = 15 minutes ich = (Candle_High - Candle_Low) * Candle_Volume Final results should be the sum of -> ich(n) + ich(n-1) +
Hi I am trying to allow an EA to accept some external integer values as string times "HH;MM". I have the following code which compiles and runs but an error occurs and it says the time is formatted incorrectly. I suspect it may be my concatenation method but can anyone advise? extern int StartHr
which operator should I use ? step 1 to start up the case, all conditions no 1&2&3 should be achieved. step 2 to stay in the case, not all the conditions should be still achieved, conditions no 1 is enough to stay in the same case. or, exit the case if all conditions are not achieved, not only one
Hello coders! I coded my EA to use the time I place it on chart, converted to integer, as the Magic number. This helps to keep my Magic different each time I place it on a different chart. Problem is, the EA does not recognize it's deals after I switch time frames. Does this mean that the EA is
Hi, i used the search but could not find anything. Is there a way to create files in tester mode which will survive a restart? Global variables don't seem to work either. Thx
Hi All, Im new to EA development although ive been trading for years. Ive created an EA that has good results on the MT5 back tester for 1 year, 5 year and on major / minor currencies using both open bar prices and tick method. I want to know if these results are actually reliable and indicative of
I have an EA that runs on multiple data from indicators that I use. How do I import data from these indicators to be able to use my EA on other terminals
Hi Guys anyone have an EA laying around that can close trades when an object is painted or if price crosses a particular indicator? many thanks shabaz
Hello to everyone! In MT5 I am trying to use buy stop limit order using sript from this website. I open the script, insert the required values and clikc OK. After I click OK the pending order should be placed but nothing happens. What could be wrong? The auto trading is checked as active. Thank you
Hi experts, If I am running too many encrypted ea(*ex4/ex5) in an account at the same time. Is it possible to create ea for distinguishing their positions/deals/orders each by each
I have the problem, that I do not get the price of the execution, when I use the class CTrade, the position is opened or closed, but the price is 0.0. I wrote a small expert Advisor for test. In the Demo Account everything works, but only at Livetrading the price is 0.0 Does anybody know, how to...