MQL4 and MetaTrader 4 - page 372

Hi everyone, i must say that i'm not a coder, so this is one of my first attemp to make my own indicator, its based on rules wrote in other language but i wanted in mql4. I attached the mql4 file if anyone could answer me whats wrong. For an unknown reason the code works fine till i try to calculate...
Hello I am just wondering how can i place multiple trades so i can have lets say 2 or 3 different Take profits? Do i have to lower the lot price? Every time i do the first one when i try to do a second trade i just get insufficient funds. For example if i want to do EUR/USD BUY @ 1.1310 Selling...
In my Terminal section below on the top 3 tabs labeled Main/Favorites/Purchased I get nothing they are blank ! All three are under the Market tab. I am connected to the MQL5 Community ? I really need this fix because I have purchased indicators and plan on purchasing more on the MQL5 web site and...
Hi! I'm trying to understand how the s1 and s3 values are calculated in this for loop. How the initial values are calculated? Shouldn't be 0? This is a for loop in the Damiani Volatmeter indicator. for(int i=loop_size;i>=0;i--)   {            double sa=iATR(NULL,0,Vis_atr,i);      double...
Hi, I put a Sell Limit, without TP and SL to test something. After a while I see the Sell Limit deactivated in Account History. Image below: Why this happen? Thanks
Hello, I have a rather simple EA that in `start` function checks if it's trade time (which is True once every hour) and then, if True, makes HTTP post request to localhost web server (implemented in python). Python is run from Linux subsystem inside Windows Server 2019 Datacenter. Server is hosted...
I'm using the zmq bridge to be able to code in Python and have Python communicate with MT4. I have everything working fine locally, but was wondering how one goes about setting this up on the VPS. The zmq connector uses tcp ports to communicate. I'm assuming I get a server address from somewhere and...
Ref: https://docs.microsoft.com/en-us/windows/desktop/api/WinBase/nf-winbase-formatmessage Below code is the syntax: DWORD FormatMessage(  DWORD   dwFlags,  LPCVOID lpSource,  DWORD   dwMessageId,  DWORD   dwLanguageId,  LPTSTR  lpBuffer,  DWORD   nSize,  va_list *Arguments); In my MQL4 code, I...
Hi all,  I don't have the greatest grasp on memory allocation so I'm wondering if this issue has something to do with that. Here is the problem I'm having: I start with 3 user input strings: input string currencyTickersString = "AUDCAD,AUDCHF,AUDJPY,AUDNZD,AUDUSD,CADCHF,CADJPY,CHFJPY,EURAUD,EURCAD...
I am looking for a system to extract out a signal from an email message, parse the data in to a text file or database and then have an EA process the order in MT4. Has anyone done this before or know where I may find such a system? All assistance will be greatly appreciated
Dear coder, can someone show me how to code the mql4 to read value from this indicator. FX5_MACD_Divergence_V1.1.mq4.  From the data windows shows 4 values. Value 1 ... to 4. How to code, let say I want to compare if value1>value2. How to set the buffer and make variables. Tq Sir.
Hi all. I have an EA that records H1 candles from the chart. I want to get data from as back as 2007. I have tried a few brokers but the furthest back I have got to is 2015. Do you know any broker who lets you go the H1 chart in EURUSD back to 2007? I have tried to get data from 2007 from dukascopy...
Dear MQL4. Community members! We are glad to inform you that the book by S. Kovalyov is now available on this website. The translation and proofreading are not fully complete yet, but you can see many sections of the book in English now. We would also like to ask you to put all your notes and...
if (counted_bars<0) return(-1);   if (counted_bars>0) counted_bars--;   limit=Bars-1;   if(counted_bars>=1) limit=Bars-counted_bars-1;   if (limit<0) limit=0;     for(i=limit;i>=0;i--)   {      hhb=Highest(NULL,0,MODE_HIGH,dist,i-dist/2);      llb=Lowest(NULL,0,MODE_LOW,dist,i-dist/2); Hi all,...
[Deleted]
Hi fellows, especially fellow programmers.... I was wondering the ways of how the bot can identify a doji price bar, where the open and close price of a bar close relatively the same. I'm not programming this myself but I'd like inputs on how to do it MQL4's language wise.. I mean its easy and basic...
Hoping someone has some suggestions for how to resolve the below. A broker I use only offers reports generated via MT4. The figures are accurate for closed trades but I'm still struggling with how to generate an accurate report for a specified period for open trades. e.g. I want to see what the...
Hello, I have an indicator in ex4. I wish to programmatically retrieve last value of this variable (level) that is in the indicator: I wish to retrieve #4 and #5 price levels..... Thanks
  Rectagle price  (3)
How to check the highest and lowest price of a rectangle drawn by a mouse in mql4 ? I drew a rectangle as in the picture, but I want to see the price in mql4, can I make it?
i was wondering, i have custom indicators, however they seem to not save once i change them, for instance one has a colored in sectino between 2 moving averages, but i am trying to make the color translucent as it is coloring over the bars, yet when i change it, the color goes right back to being...
Let's say that we modified the stop loss of an order with OrderModify() and then we closed our computer. How can we get the original first stop loss of the order after opening the computer next day? Is it possible in MQL 4? Thanks.
Hey there, quick question: Is there any way to set a custom text to push notifications that MT4 sends to mobile about transactions? What I have in mind is that instead of the default notification text unforming of a closed position such as for example "order #35811722 buy 1.00 USDCAD at 1.34242...
I have an EA for Period 5 min but in the code I also use daily data like the daily 8and 21 SMA.  I want to backtest my EA butsince  MT4 cannot backtest multitimeframe  I need a workaround for this: I have this daily SMA filter: iMA(Symbol(),PERIOD_D1,8,0,MODE_SMA,PRICE_CLOSE,0)  < iMA(Symbol()...
Hi,  I know how to use Print() function to get messages to show in the Expert tab locally, but when I load the EA to VPS it does not show any of the Print messages. Is there a different function or method of going about this I need to use? I just want to run some different diagnostic checks when an...
  Disabling EA  (7)
Hi everyone, I wrote an EA that seems to not be working all the time. I do not think the code is the problem so I was wondering what are the current technical problems that may cause an EA to stop working. 1/ Is it possible that after a certain number of tests, the EA needs to be restarted? 2/ Is it...
How do I draw rectangles on the top of the chart? I also want them to stay there if I zoom or unzoom. 
Hi The double open[] gives the open price of a bar. As in https://docs.mql4.com/predefined/open Is that price bid or ask? Thanks
I think it is not possible to develop en EA that connects to another account different from the actual running one, but I want to be sure of this.. thanks!
Hello coders, I'm trying to implement a partialclose function to my trade manager, but I don't actually know how to make it work as expected. With this code I get several partial closes at specified ClosePrice, what I need is to partial close at distance from the OpenPrice for first step (this does)...
Used to be https://storage.mql5.com/!/#.
The indicator setting is like this: 1. Moving Average Period:5 Method: Linear Weighted Apply to: Close 2. Moving Average Period:5 Method: Linear Weighted Apply to: Median then change Apply to: Previous Indicator's Data How to create a indicator that can give us signal when this two MA crossover