Expert Advisors and Automated Trading - page 316

  Free Margin  (1)
Hello. I have a question regarding the AccountFreeMargin() function. Genrally you can open new positions unless the Margin level is >100%, i.e. free margin >0. But many brokers still have a delay between time when the order was sent and time when the order was opened. While the AccountFreeMargin()...
Hey, I'm kinda of new in MQL5. I have a EA that buys one stock first (let's say PETR4) and then buys another one (let's say ABEV3). The  only problem is that I can only order the second one when the first one is executed (not only placed). I used the MqlTradeResult.retcode to get the return number...
Hello everyone: I have a question, How pass arguments of any type to a fuction, for example: string StringConcatenate_MQL5(void arg1, void arg2, void arg3, void arg4){ string result=""; StringConcatenate(result,arg0,arg1,arg2,arg3,arg4); return result; } Call to function: string Vars...
Im debating doing it. What it would take to maintain a version in both codes. If it would be time better spent to remain strictly on just one version. Opinions?
Hi everyone Can anyone post a piece of code for adding multiple positions (ie one sell and one buy) without closing the previous one(s) Thanks in advance Dada
Hi, guys, first ever post. I've been coding with the mql4 language for a few years now :) but my latest EA is worrying me. So far it is showing profit in a demo, but It starts over 200 trades per week! Clearly slight changes in the spread value will have a massive inpact on the outcome of profit....
Hi I would like to know whether it is possible to suspend/ cancel a signal programmatically. This is a very important function that should be included as the signal keeps opening trades even after you close its current positions. the only way is to suspend or to cancel the subscription before you...
In the history data of m1 I have a hole - ok, can happen. E.g. if I want to 'start to feed' as of a date that is within that data hole I get the last existing m1-bar so to say the left end of the hole: datetime tA[], t0 = TimeCurrent() - 5040000; // ~60 days => ~ 2017.06.14 02:46:10int nA =...
When I tried to publish my EA it is said that - I have to add #property strict code in my EA However, after I did that & when I tried to compile new 43 warnings & 6 errors came out from nowhere!! Here are some example: 1st warning says: implicit conversion from "number" to "string" & it indicate...
Hi guys. I have some questions, I hope someone could answer its. I have created some EA's from the std library (MT5), as for exemple: SMA (5) + SMA(10) +  Stochastic (14,3,3) + RSI (9) (four indicators) to apply to a lot of symbols. 1- I have tried to use it in  1H, M30 Charts and I see that when...
Hello, An indicator will draw a H.Line on the window. Can any indicator (same or different) see that H.Line? Is it possible to create some condition like the following? Eg.  ***if(there is a "dotted red H.Line")  do that;  else do this.....*** Thanks for helps
Hi, people. In my EA, I am using the AdoSuite.dll library to connect to a database, save data, make some calculations externally, and return the results to EA. During the Strategy Tester Optimization, I am able to process the EA among the local cores, but I can't make it work out with the remote...
  Metaeditor  (4)
Is there any way to stop metaeditor's auto-complete from recommending methods which are not made public? For example,  class MyObj : private CObject{}; Now the autocomplete still recommends the public methods of CObject despite them not being available to the compiler. 
[Deleted]
Hi, the website from the MQL5 community offers extensive filters to search for signals: max drawdown, trading time, subscribers, etc. BUT I haven't found yet how to filter between signals on real accounts and signals on demo accounts. Indeed, when training on demo accounts, it is only possible to...
  SIGNAL DELAY  (6)
Hello! Does anyone know, how much the delay between the sender and the receiver is, if someone subscribes to a signal? 
Hi, I'd like to close part of the pocition. Eg. the opened position = 1 LOT. And I would like to close 0.7 LOT. I am using the function PositionClosePartial, but it does not work for me. Maybe because of the last parameter "Deviation", as I could not find what are the units of deviation (But I have...
Hey guys, i hope you can help me. the code is  //+------------------------------------------------------------------+//| Script program start function                                    |//+------------------------------------------------------------------+void OnStart()  {//---      double...
I want to put an expiry on pending orders, which is fairly straight forward using OrderSend. However if the pending order gets triggered and turns into an open order I don't want it to have an expiry. Is this the default behavior or does the order need modifying once it has become an open order?
All; I have a robot that I ran optimizations on, and that I started trading on a live account. It worked for a couple of days, and then stopped working... Didn't make any changes to... Now, it won't trade at all. Has anyone else experienced something similar with their robots? 5 - digit broker Tom
Question 1: I hired freelance coder and he made me EA I closed job and everything was fine. Now I spotted an error, so is it responsibility of that coder to fix the error that I spotted after close of job ?  Question 2: I hired same freelancer again to modify same EA for adding new functions. But...
Hi everyone, I was wondering if someone could tell me if this sounds doable, and please excuse me if the answer is obvious, I am a noob when it comes to this stuff.  I was wondering if it would be possible to bounce a signal from an indicator onto remote accounts, connected with some sort of...
Hi All, I have a problem with my EA that I'm testing ( 15 minutes timeframe ) Sometimes it hit TP from my OrderSend() that already specified "Take profit" value.  it shouldn't hit those TP, if price does not exists, I found the issue only TP but not SL. Please suggest. Thank you very much
Hi guys, The function WebRequest is ready for IP V6? I asking because today a client's Windows 10 was updated and the function WeRequest() is not working any more. After a lot of testing, everything gets working again when I desabled IP V6 in the internet config of the windows. The EA uses...
[Deleted]
Hi, I've been searching & reading a lot of articles of  dll development but no projects seems to be sound.Most of them no longer works. I know how to call c++ dll in MQL but can't find a working/simple solution for calling C# dlls.  Can any of you show  me a simplest example with just 1 imported...
Hi I'm a beginner in mql programming I am trying to program my first expert I need to call zigzag Indicator and do some thing (a code)  after zigzag set last line the expert calculate the number of bars of this line for example (image1) and do some code with this result (number of bars) also with...
Hello guys,  I'm building an EA based on ATR range breakout and real volume with a MA filter. In the previous version the backtest was executed normally, but then i decided to determine the position size through the  ATR to normalize risk. This is what i did:      input double atrSl;double...
hi i m unable to calculate history orders profit and loss in total. but i m very confuse about deals and orders. i tried both but not success. even some success with getting tickets all history from  HistoryOrderSelect . but there is not option to get Profit Value like POSITION_PROFIT. can any one...
i have an expert that open orders on 1 MIN frame.. i want to tweet ( twitter ) orders and any modification of opened orders.. my project is to start twitter based signal service... how to do that
Hi all, I would like to run an EA that allows me to close an open trade that is X number of lots once the loss reaches Y amount. For example, I might have many open positions with various lot sizes (eg, 0.01, 0.02, 0.03, 0.04, 0.05 etc). What I would like the EA to do is only for trades with lot...