MQL4 and MetaTrader 4 - page 142

To post a new topic, please log in or register
Hi comrades. How can I print the profile I am using? Thanks
I have registered for a Virtual Server on MT4 through the MQL5 website, I did this so that I could get push notifications from alerts while my computer is off but the alerts don't get sent. I have push notifications set up, I have synchronized all, but nothing is working. A fix to this issue would...
is there any code base available which could directly open multiple trade on different currency pair based on any single trade pair. for eg : suppose I put up any tarde at certain moment for EURUSD,then at the same time multiple trade could be opened with other USD pairs(AUDUSD,GBPUSD,NZDUSD,USDCAD...
Hello guys, im facing issue with BasicHashLoop in  "hastable-templated.mqh" which I am using for having avalable something like dictionary is in different languages. Ofcourse I would like to not use third party codes, but Im not sure how to solve the situations that I need to hold number(count) of...
So when using different functions to check if an account is a demo or live acct, is there a difference between functions?  Specifically, is there a difference in how the functions check to see if account is demo?
fellow programmers, n‌eed help on reset the flag for LotSequence counter as below. ‌The LotSequence() function will run a the beginning of new bar, H1Function DailyProfit() will check Current Daily profit.if Daily profit <0, counter should run 1 time and lot should be StandardLot*Multiply_1.On the...
I have couple of questions regarding the installation path for Scripts folder on some of PCs. ‌‌When I install mine, it located at C:‌/Program Files (x86)/<broker> but my friends installed at the C:\Users\User_account_name\AppData\Roaming\MetaQuotes\Terminal\Instance_id W‌ould like to know why is it...
1. Is it possible to get an object's index value by not having to cycle through a for loop with ObjectsTotal()? ‌2. Is it possible to get the index value by shift of a Channel's OBJPROP_PRICE3? (i.e., the trendline in a channel that has a single anchor point)
Who has this indicator's mq4 file? Please help~  
Basically I want to draw a short horizontal trend line from a specific timestamp to any position X pixels to the left or right.  ‌ You might suspect I have problems with the zoom level, so I want to use pixel instead. While this is also the case, I already solved the issue by simply calculating the...
‌How do I code the movingaverage variable‌ so that it gives the exact correct data ? ‌In other words , I cant correctly retrieve the iMA data. double  iMA(   string       symbol,           // symbol   int          timeframe,        // timeframe   int          ma_period,        // MA averaging...
Hello everyone, I have a problem regarding an EA in Metatrader4 build 1045 (SimpleFX MetaTrader 4 Terminal) on Windows 10. Until a while ago, the EA worked just fine. The problem is.. I make little improvements every day, and some day it stopped working properly (or simulating until the end).   The...
If I set up using this as shown in the figure, apply the regional language to English.   But,If I changed the locale language as shown below.It is not right.   How is this if i send a program to someone else i can not ask him to change the system settings.   Interestingly if I edit the script with...
Per this article on MQL4 https://www.mql5.com/en/articles/2555 ‌ Errors that occur when working with symbols which have insufficient quote history If an expert or indicator is launched on a chart with insufficient history, then there are two possibilities: the program checks for availability of the...
Hello, I want to have a random number between 280 and 340 at the beginning of my EA.‌ So, I tried to make it in the onInit() But they have all the same value when I have, maybe, 5 charts with the same EA and I restart Metatrader and they load all at once. So, how can I build for each chart a random...
Hi, Is it possible to oblige an EA to trade only long or short from code. I know it's possible manualy, but by code? ‌If, yes what command have to use please? Thanks‌
Hey guys, I have an EA that puts a buy trade when basically there is no signal. What could be the problem? Any ideas? ‌Here is the code: //+------------------------------------------------------------------+//|                                                      ProjectName...
I want to test a trading system with the strategy tester (30 Minute timeframe). Trading this system I first decide discretionally whether I determine the Market to be long or short. So for testing the system in the Strategy Tester I need to define a certein period of time, let's say from Jan. 1st...
brianroxxxfx
      ‌I am getting improper enumerator errors for these following 4 lines, ‌ maOpen=iMA(NULL,0,MaPeriod,0,MaMetod,MODE_OPEN,pos); maClose=iMA(NULL,0,MaPeriod,0,MaMetod,MODE_CLOSE,pos); maLow=iMA(NULL,0,MaPeriod,0,MaMetod,MODE_LOW,pos);‌ maHigh=iMA(NULL,0,MaPeriod,0,MaMetod,MODE_HIGH,pos);
In the code below, the error comes up on ChartOpen.  Now, despite the error; the chart still opens.  After going through a few things, I actually found out the problem.  MT4 using too much memory.  I made the following changes: Somehow after I installed MT4, I forgot to change the Max bars property...
Hi, I have built an EA from scratch and am running it on AUDUSD 30M.   I have done lots of backtesting which is fine. Then I ran the EA on two live demo accounts on VPS servers for 2 weeks and the results are good / in line with my expectations and the backtesting. I decided to put real funds into...
Hi All, ‌‌Not sure if I am posting in the right forum here as I don't see any reference to MT5, only MT4, so apologies if I am in the wrong place. Also, is this just for programming backend stuff or for all help? I guess I am about to find out. ‌‌New to Metatrader and I was just wanting some help...
With the help of my friend, i have got an ea coded, which works perfect. I am checking it for past one month and till no no loss.... It's performing very well. But the only problem is, it opens multiple trades whenever a signal is generated... I tried to restrict that, but i get errors while...
Is there any way to make the latest build/release of MT4 portable? In previous builds, I had all my terminal installations, installed on my D: Drive under a directory tree structure organised by Broker, Live/Real and Account with hard-link junctions points for common areas such as experts,...
In the following code why does it return my object AVGVol1 as 0.0 and not the average of volume it should? I see AVGVol[0] works and returns the volume okay, so this array work as far as I see‌. But it doesn't work within the iMAOnArray parameter? Why not? Any help on this I would be much...
Hi,  In my EA based on MA's I want to have a trailing stop attached to any open order.  I thought I did it right but the trailing stop moves both direction, not only following price up (or down if it's a sell position).  For instance, open price buy position 100, ts 10, price moves to 110 and my sl...
As I understand it, Bid price is the actual market price, while Ask price is an artificial price which is determined by each broker for either Opening or Closing an order (creating the 'spread'). My question is, what constitutes a "tick" ? i.e. a tick is the point of incoming price change. When I...
I am very new to MQL4 How to pass ENUM values to array -  ENUMDataInput?  How to programmatically count ENUM size (so I don't have defined ENUMSize=5) ? Thanks for the help. ‌ enum MALines{_20=1,_34=2,_50=3,_100=4,_200=5}; int ENUMSize=5; void LinesArray(string ENUMDataInput, int ENUMSizeInput) {...
A couple of days I did deposit some money in my mql5 account. When looking at MT4 the Balance was not updated. I‌ don't remember what I did, but finally it worked. The other day a friend of mine had the same problem and now my brother as well. I‌s there a way to refresh this so I can see the balance...
Hi ‌I'm attempting to debug MQL4 code in MetaEditor 5.00 while using MT4 as a platform and cannot seem to debug my EA or Indicator code. Breakpoints are ignored when I select Debug/Start on Real Data (having selected a market under Tools/Options/Debug) and there is no 'debug' section visible on the...