MQL4 and MetaTrader 4 - page 392

Hello, I am a beginner in programming MQL4. I know basic stuff already and I programmed my first EA already but a very simple one. The problem I have is to find out if there are functions to analyze historical data first to get a basis for a trade decission. For example how do I get all highs and...
  iCustom Simple  (2)
Hey ladies & gentlemen, how are you ? I need your help please Simple question : What is the code please for iCustom Indicator Candlestick Result ?   "1 Minute" is the name of the indicator    if(isNewBar //Send order when new bar opens   && iCustom(INDICATOR_CALCULATIONS,PERIOD_M1,"1 Minute",...
I found a free EA in the codebase. The default settings were not good, they were strange and confusing actually. I made some adjustments to them and have managed to turn out various profitable back tests on it.  See one of them above.  The interesting thing about this is this was a long only...
Hi,I want to know how to code the OrdersTotal() is changed(decreased). For example, I have 5 orders now. OrdersTotal()=5. If one order is closed (either TP or SL)  and OrdersTotal() is now 4 orders, The number of order was  decreased. How can I know this?
[Deleted]
I cannot provide the copyrighted codes. Optimization 1 or 2 passed succeeded but, after 1-2 hours, this error occured and stops. I want to know the reason. This error results is from Windows Server 2008 R2 Enterprise VPS 64bit. (with RAM 2GB) Dll Dependencies are Kernel32.dll only.
  Is this possible?  (14   1 2)
I have an indicator which looks for the cross of 2 variables - the tenken-sen and kijun-sen. Once they cross, an arrow is drawn on my chart and notifications sent etc. I would like it to also check the timeframe 'above' to see if a cross in the same direction has already occured - i.e. if it's on M1...
Hello everyone, I have this statement in  OnTick(). I'm trying to work out a way to only alert if result changes. atm it triggers an alert everytime even if there isn't a change to result. How is it possible to make it trigger the alert only if condition changes state?      if(Condition1 &&...
Hello, This is not my indicator but I was wondering if it would be possible to make an alert when RSX reached 70 or 30? RSX
A Metatrader 4 demo shows a single price on charts which is nearly the average of the bid and the ask prices. I've never seen such a feature on Metatrader 4 before ... How can I view the bid and the ask prices separately on chart?
Hi there, I have a password validation class that uses the AccountInfoInteger(ACCOUNT_LOGIN) to compare with an encrypted input parameter (loosely based on https://www.mql5.com/en/code/15534). This call is made in the OnInit function in the Indicator. If it legitimately doesn't validate, I...
  Pips  (15   1 2)
Hi all master traders, I would like to ask how to write the pips on mql4. Example : i buy 1.2500 then increased 2 pips become 1.2520 and so on... Thanks all.  Victor
  Price Alerts set via MT4 app  (12   1 2)
Hi i am aware we can set price alerts on MT4 and get push notifications on our Mobile Phone But are we able to set Price Alerts through the MT4 Mobile App? Or must we strictly only set through the desktop
hello i made an expert, it works good but for a reason it need a unique number to restore every trade so i tried to save ticket number i searched file open , and arrays but i couldnt find what i want beside im not good in arrays finally i found something near to what i want i got the code but it not
[Deleted]
I was wondering if anyone could find the time to write an EA for me? I currently have an automated trading system I use in ActFX on Forexyard (TwoMAs.act), and I would like to implement the same strategy in MT4 to auto trade if its possible. Its just an EMA cross, but with defined stop and limit....
Hello, Im using MT4 backtesting 2 ready made EA to learn about the platform but I cannot get the result tab, only settings, optmisation, optimisation (both blank) and journal. Your help is appreciated, IV
Hello, I've been trying any format and a half dozen youtube videos, but can't manage to import even a perfectly prepared CSV file into the history centre. Here on the forum, I even found the tip to export existing data to emulate the formatting - which I did, to no avail. Worse, even if trying to
To see long-term trend, I want to plot OHLCV data on a weekly timeframe. I prepared GBPCAD10080.cvs file as attached, but it is not recognized on mt4.  What's wrong with it?  FYI part of data is as follows : 2005.09.04,00:00,2.1667,2.1855,2.2022,2.157,390321 2005.08.28,00:00,2.1915,2.1571,2.193,2.12...
hi all,     string status = "";   double currentLow = LowMapBuffer[shift];   PrevLowMapBuffer[shift]=LowMapBuffer[shift];   double previousLow;   // find the previous Low   for (int i=shift+1; i<shift+1000; i++)   {      if (LowMapBuffer[i] != 0 && ZigzagBuffer[i] != 0)      {         previousLow =...
Hi,  So far whenever I am facing a problem, I always can find a solution from MQL or online. However, I got stuck on this problem. Maybe this is a limitation from MT4. The task is to open a chart using Chartopen(), and then draw something(lines) on the opened chart, but not the one we run script on....
hello traders,  Mql4 function IndicatorCounted() returns a value for the current chart ....how to get the amount of bars not changed after the indicator had been launched last on a chart differnt from the current one ?
Hi everyone, Anyhow please, how is correct way for: void TrailingAlls(int pType,int stop,double AvgPrice)   {   int profits;   double stoptrade;   double stopcal;   if(stop!=0)      {      for(int trade= OrdersTotal()-1; trade>= 0; trade--)         {         if(OrderSelect(trade,SELECT_BY_POS...
  Persistence array - MQL4  (13   1 2)
Hey guys, I manage my trades using an array, the array contains the next Take profit level, how much lots to close at certain points and so on. The only problem I'm facing is if somehow my EA will crush? Or I will write a new version and need to redeploy?  I'll lose my unrecoverable array. If I...
Hi all, Part of a script I am trying to run is needed to count the number of times that Price is equal to a value from an indicator. the current function I have that I would expect to work is here: int GETCOUNT(double P)   {    int bar = 0;    int index = 0;        while (bar <= Bars)     {      if...
[Deleted]
Hi, I moved to new computer and was forced to install a new built of MT4 way above 600. Almost all my compiled scripts are working, but those that don't return the same error: "not all control paths return a value". In theory I understnad what it might mean, but with my basic programming skills I
  market newbies  (1)
how do I download free indicators? No market pace on my terminal.
I am testing a simple EA that uses three MA, with the iMA api. When testing it, the chart shows the MA lines.  I would like to color or hide these MA lines. Is this possible?
hej, i would like to 1. create 2. check 3. changeValue 4. delete a Global Variable The Variable shall have the Name of the Symbol and which the ea runs and LOL....example"EUR_USD LOL" how could i archieve this
Hello guys, I cant figure out... After i compiler my coding, it works accordingly but there is 2 warning sign showed and i cant find out what is the problem with it. Hope expert out there can help me out with this problem  if(wt!=Time[0]) {  if(TotalOrder(0)<Max_order && TotalOrder(1)==0 &&...
I want to write an EA that joins the highest points of each candle using a trend line (after the first six hours of a day). I saw the the documentation for the trend line (https://docs.mql4.com/constants/objectconstants/enum_object/obj_trend). This is what I've done: ObjectCreate(chart_ID,name...
I have no coding experience but i will be so grateful if you or anyone out there can help me to code an indicator in form of two horizontal lines base on this info.. 1)  previous bar high-previous bar low=X next bar open price  +  X plot horizontal line at the calculated value high 2) previous bar...