MQL4 and MetaTrader 4 - page 90

To post a new topic, please log in or register
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,...
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...
Hello, I open this post because I was using DayOfWeek but last weekend as it receive the last known server time my script think it was Friday... I tried to use MarketInfo(TRADE_ALLOWED) but it didn't return me FALSE neither TRUE but if I well remember last weekend it return -1  ??   My script is a...
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
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.
I having a problem bringing up my acc balance info on the mt4 platform. When I login to my acc/platform, my acc balance is not shown. How do I have my funds transfered back to my Forex.com Acc?
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...
Hey guys, I just need some help with the logic to this problem I seem to be having, and perhaps it is because I am thinking of this in the incorrect manner? So, for finding the time of the beginning of the week from any given day within that week, I have simply  used: int day_of_week=DayOfWeek();...
  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)...
Hi i got and issue to make EAs work on "Offline" Renko Charts i've tried *every* renko generator there is and NONE made the EA trigger the OnTick() function (i put a simple "Print" at the beginning of the OnTick( ) function) list of the generators i've tried: renkolivechart_v600 EA_RenkoBuilder...
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...
https://www.mql5.com/en/code/14085 I used this code as a base and modified it to close the last trade of either OP_TYPE before opening the next. However, after a while the trade copier stops placing trades altogether. My modified source code is posted below.
Hello,  Recently, something wrong happened to me from Metaquotes. Back in February 2015, I had discussions about the gateway between me and the sales team from Metaquotes. I was not sure what the gateway was. Metaquotes is claiming that this gateway was added to my license but not added to the...
Hi, I couldn't find a MTF version of the Fisher Transform indicator so i decided to create one and post below. Please note, this is only a quick mock up, so there could be various bugs etc. Example interesting results can be seen on the following for EURUSD: Set colours to None for indicator buffers...
I am trying to write an indicator that plot the volume, its moving average and its standard deviation. When I compile it, there is no error. However, when I try to plot it onto the chart, there isn't anything. What's went wrong? Thanks in advance.  Below is the code. #property...
Hi, when I open a chart with the OpenChart() function the checkbox "allow live trading" in my EA's properties is always disabled. But when I open a new chart manually, the EA's properties are correct and live trading is allowed. I don't understand that because the function OpenChart() uses the...
  ILAN- Need Stoploss! (16   1 2)
Hi everybody, I request you to kindly plz take out your precious time to code the stoploss in this version of Ilan. I like this version and used it in live account too. But sometimes when markets moves long direction it blows cause the stoploss is not working when set to certain level as well as it...
Hi all! I'm trying to display in an indicator the current profit level and the % of equity that it represents. Actually, I'm testing it across 17 pairs and it this moment there are open trades on 14 of them, so I would expect to have information displayed for all of those. However, for some reason,...
Hi all! I'm trying to build an indicator based in ADX and a MA attached to it. In MT5, when I use iMA I can apply it to a handle. How can I do this in MT4? This is how I'm doing it: for(int i=rates_total-14-1;i>=0;i--)     {      adx[i] = iADX(NULL,0,14,PRICE_CLOSE,MODE_MAIN,i);      ma [i] =...