Expert Advisors and Automated Trading - page 110

can anyone help me please, webrequest function always returns 1001
I've been trying to test my socket connection using tester, as I will need it to communicate back and forth with Python. But it keep returning 4014. What I found in the documentation (https://www.mql5.com/en/docs/network/socketconnect), it cannot be called from an indicator, I've made it as an...
I've recently seen quite a few updates to Integration with Python, including various functions. Does it can be used in back testing? According MQL5 Reference, I found that there is no such function. At the same time, Socket functions can not be used from the Strategy Tester. Is there a way to
I'm trying to do this programmatically, but I don't see a way to do it manually either. Is this possible
Hello everyone, I have a problem when I create a Panel in MT5 using Dialog library. I have some elements within my dialog box, when I need to use "Destroy" method to delete some objects within my dialog box and then again use "Create" method to create those objects, when I do that the relation
How to identify panel button click during testing. OnChartEvent of course doesn't works
Hi All, I would like to know whether it is possible to check historical Account Leverage ? Alternately, if someone can guide me on how to calculate the Account Leverage using MQL5 code for a given date time would also be useful. I've tried the below code, but the output in the journal always returns
Hello, Is there anyone who can help me about CHART_SHIFT_SIZE in my EA, it works with charts, but not in strategy tester . I have a rectangle panel with labels and everytime, bars are behind it. Thx a lot
  Please help me  (1)
Hello for all I have error in EA RSI and want to fix it,The error is the EA close the position randomly without hit SL,TP,Or close trade by opposite signal ((i set the close trade by opposite signal to false)) and the EA still close the position randomly
Hi, I am using EA position sizer that automatically adds the stop loss and take profit lines onto my chart once I place an order. I should be able to drag the lines on the chart if I want to change the stop loss or take profit. However, a few seconds after I drag the lines to a new price, they
Hi everyone, does EAs work when I close my notebook. It is still on
Hi all, why is so hard in MQL5 to get last closed position profit, or at least if this was >=0 or <0 ? I'm not posting any code as I tried all that I could find on mql5.com, but none of it worked. Please, can anybody post some minimal example ? Thank you
  Emoji to Telgram messages  (11   1 2)
How do I add emojis to my telegram messages? Below is the code but it does not print the emoji when a message is sent. if (Notify_Modify) for ( int i= 0 ; i< ArraySize (OldOrders); i++) { if (OrderTicket()!= OldOrders[i].ticket) continue ;
hey i want to add a minutes to the expert advisor now the expert have just a hours parameter and its open a 2 pending orders (SELL and BUY) every minute.. somebody can help me to edit this code? please 1. add a minutes to open a order in specific time 2. open just 2 pending order and not every
I have isLogging parameter in EA to indicate whether calling Print() or not. I turned it off but failed to pass validation of MQL5. Then I removed this parameter, I can pass the validation. But I want to log something instead of turn it off. May someone advise how to fix it wisely? e.g. can I clean
Hi folks, got an issue with an self programmed EA. After opening my position my EA is advised to add a SL to the position. But I always get the hint below:&nbsp; "2016.08.17 10:29:39.064 Trades '3895623': failed modify &nbsp;buy 0.00 &nbsp;sl: 0.00000, tp: 0.00000 -&gt; sl: 1.11690, tp: 1.15690...
Good day codders, I want to get the ema value of the price I stored in an array, please what is the best way to do it in mql5? this is my code below //copy price to an array using copybuffer MqlRates barsPrice[]; //ArraySetAsSeries(barsPrice,true); int copied= CopyRates ( Symbol (), NULL , 0
I have been experiencing bugs in forward optimization for a while now and I am trying to identify the problem (post about bugs: https://www.mql5.com/en/forum/454524 ). The only error message that shows up says in the journal tab is " x forward passes not processed and returned to task queue". If I
double prev_buy, prev_sell; bool Enable_Trade = true ; void OnTick () { double buy = 0.0 , sell = 0.0 ; double atr = iATR ( Symbol (), PERIOD_CURRENT ,ATR_period, 1 ); Check_Time(); buy = iCustom ( Symbol (), PERIOD_CURRENT , "SuperOsmaArrow"
I need some help from an experienced developer. I would like to do the following: 1. Create a database in memory in "OnTick". 2. Do one query from defined StartTime to Timecurrent() and copy all the transactions to above database. Benefit is much less interaction with main server, less lag and
Hi guys, i have a problem with my simple expert advisor, it gives alerts whenever an inside bar forms as shown in code below but the alert rings continously until the next candle closes. how can i stop it to make it only ring once?? Thanks in advance
I've looked for any documentation on what's under the hood of this function with no luck so far. I'm trying to calculate required margin for upcoming positions, and OrderCalcMargin() gives me a different value than the standard calcuation that I'm digging up everwhere else on the web. I'm currently
Hi all. I have been using MT5 for trading my funded account for about 8 months with very little issues. I have a macbook, I use the downloaded MT5.dmg file specifically for mac. I have just started getting into EA's, and purchased a few. It seems that the windows version of MT5, once you open the
Hello, I read many threads about this topic but they are of some years ago and I want to ask about the actual situation in a more clear way. I want to develop an EA that is reading the values of the economic calendar and trade. My questions are: 1. How fast does the mql5 economic calendar give the
Hi Everyone, not entirely how this works since this is my first post:) Everything in this EA works fine, i tested it all multiple times. The only issue lies in the createObject. It works fine when i create objects just for one symbol which i make corresponding in the strategy tester although when
Dear all, I hope I landed in the proper section with my question. Here is the story. I was back testing some MT5 experts I developed on various instruments, and when I came to EFA, iShares MSCI EAFE ETF (EFA.arcx), I noticed that my experts behave strange, to say the least. Sometimes they yield
Hi, I have a strategy that I want to separate between settings of long position and sell position. To simplify the process I will put a 2 same EA one with long position trade only and the other short position trade only. All the other parameter is the same including OpenPositionTicket[] to store
Hi, Im getting Invalid Price error in Validation to publish my EA. Looking at this it looks like it's not getting the price. My code regarding the order is below. In fact, it is working normally in backtests and real trades. Pls, somebody help me. request.action = TRADE_ACTION_DEAL ; request.price =
I have been testing numerous indicators, and for some reason two indicators got stuck in the chart of the STV. Now each time I open the STV, the lines of that old indicator still display. IS there a way to remove them?. Why would indicators get stuck (become orphan) in the STV? May be the original
Hi Could somebody please help me? i am trying to get the below code to compile in mql5 and keep receiving 2 errors for expression is always false for line number 44 and 66 (I have highlighted below) //+------------------------------------------------------------------+ //| Expert initialization