Download MetaTrader 5

MQL4 and MetaTrader 4 - page 53

To post a new topic, please log in or register
Hi, could somebody tell me why I cannot compile an Mt4 EA with an M45 period while I can compile it with an H2 period? M45 chart was created offline with period converter and still it doesnt work. So I can it compile for H2?? Thanks!
  Meh Spread Indicator (14   1 2)
I finally took a stab at making a spread indicator I have been meaning to write one for quite a while and never got around to it untested so it may have some bugs :P EDIT:small update I changed the color of negitive swap and added a tik monitor
Hi there, I am new to MQL4, my first ever indicator program, which I coded so far. I want to plot some values from CSV File. The format of CSV file is - 3/20/2017 0:00, 120 3/20/2017 0:05, 125 3/20/2017 0:10, 128 and so on I want to plot the values wrt the candle/bar. All is working fine, I have...
Can anyone help with an engulfing indicator? I have one but it isn't indicating on all the candles for some reason. Thanks.
Hi, I'm trying to use the heiken ashi without using the iCustom call, am I on the right lines with this:    int MaMetod=2;   int MaPeriod = 24;   int MaMetod2 = 3;   int MaPeriod2= 2;   double maOpen1=iMA(NULL,0,MaPeriod,0,MaMetod,PRICE_OPEN,1);   double maClose1=iMA(NULL,0,MaPeriod,0,MaMetod...
Hi, How can I find market Open or Close? dunction GetLastError()? What value return function? Or other function/way? Other solution? Thank you.
EDIT: PROBLEM SOLVED. Can't use ArrayCopy with struct type if one of the struct members is of the string data type. Reason in red. I'm following the same template for copying two arrays of the struct type. I use one on an include file that's part of an EA, which works (and also worked as part of the...
  ObjectGetValueByTime (14   1 2)
I have these code here to get ObjectGetValueByTime, for OBJ_REGRESSION  https://docs.mql4.com/constants/objectconstants/enum_object/obj_regression https://docs.mql4.com/objects/objectgetvaluebytime it has been discuss before, and yet I still can't manage to get double return value, as it always...
I am a developer, And I found this error : 1. When I use Bid, backtest don't show the arrow. 2. When I change Bid to Close[0], the indicator shows arrows properly. What's the difference between them?
Hi I normalised the distance between (EURGBP-EURUSD) and (EURUSD-GBPUSD). Below is the code; Now, I want to create separate variables to store normalised values of other timeframes i.e 15min 60min regardless which timeframe I am currently on so I can comment those on the chart.  Can someone help on...
  Price action (4)
Hi, Community, I'm very new to coding but have been trading for sometime. My question is can a custom indicator be created that would create a stop loss off the previous candles data? If so can you pls push me in the right direction. Thank you EJ
Hi there! I have some trouble trying to install Metatrader 4 on Linux. I'm running a desktop Linux Mint 18.1. I followed the instructions from mql5.com to install the MT4 software but when the installer starts, just as it begins to look for the best access point, it asks me to input the proxy server...
  Array out of range (11   1 2)
Hi I am keep getting array out of range errors. Could anyone please tell me how to fix this? Indicator seems to plot well the fly price, moving averages but when I add the code for standard deviation calculation, I keep getting the error message.  Much appreciated for any help...
Hi everyone, I made a dashboard that scans 7 pairs for price action candlesticks on 5 different time frames. Rather than waste time explaining it further, I'll just show a picture. Anyway, the dashboard calls on iCustom for 4 different indicators. When the indicator launches, or when you switch...
Hello may I know how to add the moving averages to a separate window as below screenshot? .. I am not asking to how add it manually, I am asking for coding
I'm wondering what's the latest version of MT4?  Does anyone know?  Thanks is advance! ‌
Hi mql community, i want to introduce new tool for mt4 developers; its similar to a tool which already exists but i have added more features like detecting multiple terminals and select per terminal. Detecting security problems etc. Here Quote from website: " Tool : MetaTrader Tick Sender...
Hi guys, I am a beginner at coding and I tried to code and apply bollinger band on closing prices of a spread ( (EURGBP-EURUSD)-(EURUSD-GBPUSD)) but the band always seem to be containing the closing price i.e the price never cross either upper or lower band so I thought I'd ask someone to check out...
Hi all i have 2 questions A) Can i test my script when the market is closed? all I want to check if it opens an order when the next bar happens I have attempted to use the strategy tester but cannot see my script in thelist what could be the problem b) how do we search this group for post
Hi all I'm probably being an absolute dumb arse, but after MT4 stopped working on a demo account (I've not gone live yet), I uninstalled it and have tried to do a reinstallation. But wehn I download and install 'mt4setup.exe. from https://www.metatrader4.com/en - it installs MT5. This is driving...
  Symbol() (3)
I have been reading over the reference manual "MQL4". I can't find the correct reference to a string for Symbol(). Alert("Currency=",(),Symbol()); At the moment the Alert reads the currency at the top of the watch window. How can I change this to reflect the watched currency that I wish to look at?
Hi I am in the process of developing a DLL for MT4 that I want to return a string that is generated inside the DLL. If I use a function in the DLL like char* ReturnResult(char* stringToReturn) and pass the same string in as I get in return there is naturally no memory leak as it is a pointer to the...
Please find attached MT4 scripts that that allow a hot key to be assigned to each required TF. i.e CTRL 1 MN, CTRL 2 weekly etc.so that when applied to a profile of markets all of the markets change to the same time frame. These scripts have worked perfectly until recently. I’m not sure why, maybe...
Hi guys, ‌ I‌ have an indicator which takes quite a long time to calculate. This is a problem when I try to switch quickly between periods as the chart is stuck as long as the calculation is ongoing. Now i want to spread out this slow calculation over multiple frames, so that i can still work with...
Hello, is there any way to find if a given function from an external mqh is called from a custom indicator or from an expert advisor? Thanks in advance!
How do I link my MT4 to my email. I have tried to do this but it doesn't work, the problem probably has something to do with SMTP
Hi, I'm new to EA and I've been using free EA builders online. However I cannot find how to program the way I want, so I appreciate if I can get any advice. What I want to capture is a sudden price movement due to news or any events. Like if more than 2% price change from previous close price, then...
i want my label on top of order line and candle graph a‌nd i want to create background color behine of mylabel i want to know command ‌ one of part m‌y command    ObjectCreate("L1",OBJ_LABEL,0,0,0);    ObjectSet("L1",OBJPROP_XDISTANCE,70);    ObjectSet("L1",OBJPROP_YDISTANCE,40);    ObjectSet("L1"...
Can anyone point me to an example of code that can intercept signal data I have subscribed to in my account?  I would like to change the way autotrading is using the data but I do not know where I can intercept the data before it goes on the autotrader.  Thanks for any hints.
+------------------------------------------------------------------+//|                                                      ProjectName |//|                                      Copyright 2012, CompanyName |//|                                       http://www.companyname.net...