MQL4 and MetaTrader 4 - page 264

To post a new topic, please log in or register
Hi everyone! I am new of MQL4 code world. I come from a C++ background and I am trying to learn MQL4 language & conventions. I am writing a simple Expert Advisor (my first of all!). It compiles but, when I test it, it ends with "every tick a trade". I attach code to better understand what I am...
Can anyone help me trouble shoot an EA. It  essentially manages the trade one entered and has worked fine for a couple of years but as of this week it won't load onto the chart? I don't have any error message in the journal and all the settings appear to be activated. Only thing that has changed was...
I am stuck with an array out of range error. I've done much search to try find common coding mistakes and have placed 'safeguards' in to try stop the indicator trying to fetch outside the range. The indicator works, but sometimes when I flick through the time frames, I will get the array out of...
Eg: EA default parameter settings as StopEA=true; If (a>0) { StopEA=False; (this to be changed in expert parameter settings) } i would like to change this settings as StopEA=false while EA runs. Is this possible to write code? if yes please advice to get!
Hi A few questions re upcoming releases: 1) Are there any plans to include Renko or Range Bars within the application? 2) Any plans to allow detaching charts / moving outside the main window ? 3) Any plans to be able to change the symbol of a chart? 4) Assuming 3) Any plans to be able to link charts...
#property icon "MyIcon.ico" What is the maximum .ico file size allowed?
I've downloaded the MT4 setup (mt4setup.exe) from Metaquotes.  Unlike installers from brokers, this one won't let me install it to a custom directory.  Is it possible to change this so I can?
Hi, I tried to implement Ehler's Universal Oscillator which he described in his article "Whiter is Brighter", an implementation at TradingView can be seen here: https://www.tradingview.com/script/ieFYbVdC-Ehlers-Universal-Oscillator-LazyBear/ and implementations in various languages can be seen here...
Hi, I am good in EA development but new to back-end (broker) integration. I win a website project of a client. My client is a licensed MT4 broker. Now I have to develop his website and SYNC it with his MT4 server. so that he could add & manage his members. Members could also manage their trades,...
Hi I have bought a new computer with Windows 8.1. When I try and run 2 MT4 platforms together, different brokers and different folder on computer one will hang. They run fine separately but if you log into the other then the one that was running hangs. Never had a problem with my old Windows 7 M/C....
Hello,  I have this indicator that i think is quite interesting, its design to find tops and bottoms in trends. My problem is that i want to have this indicator in mql.  Is there someone that understands the pro real time code and can translate this to mql?   Thanks!   Pro Real time code:  " // Add...
I need to get into the TrailingStop and BreakEven value specific candle, for example H1 10:00. As at any time during the day to gain Size, Low, High some specific candle? My simple suggestion is not working double A = iHigh(NULL,PERIOD_H1,Bars(NULL,PERIOD_H1,D'10:00:00', D'10:59:59'));...
Hello, Please I have faced a strange situation that is when when I load my expert then I enable the auto trading button, the expert doesn't open any orders, but when I enable the auto trading button first the load the expert, it works fine... Is that situation is ok.. or there is some thing wrong....
i was just trying to download the user manual and its like the site crashed after i got it. thanks to google translate it would happen to be saying Server Error 403 - forbidden. Access is denied. Provided credentials are not given the right to view this directory or page.
Mobile Trading Trade anywhere anytime with 5Stars-forex Mobile Tradingsolutions. The speed of today’s markets means that you need to haveaccess to your trades 24/7 from wherever you are in the world. 5StarsForex hasdeveloped a range of mobile trading solutions that cater to smartphone userswith...
Hi! I am newbie in mql4 programing , i want write equity profit locker for my EA and input in EA parameters . for example : after %10 or more equity grow , EA will not work until the end current month . please help me for this
  Check My Code (2)
wish that my code was working in tester, it seems to be stuck in a loop. im new to using a while loop in the start/on tick and was hoping for anyone familiar with this ..the while loop is for waiting up to 15 seconds for spread ( with each time frame ) to be normal. so basically there is no way in...
Hi guys! As a newbie programmer, I'm having a hard time understanding how does the Babon Slope indicator calculates it's values. Any help would be appreciated really, but I am most interested in the exact steps of the calculation. Thank you in advance. Balazs 
please i want you to help me on how to copy trade on mql5.com with same lot with the signal provider.... irrespective of my fund are higher or lower. for example if the signal provider open position 0.01 ==== mine will be 0.01 or 0.1 if the signal provider open with 0.03 ===== mine will be 0...
is it possible to get/peek the economics news time in both mql4/5 ? if yes, how to use it? 
is there a code that would allow me to remove the program or deinit the program if there is an error?  example: if(GetLastError() != 0) {   Alert("error");  exit EA, de initialize }    Also, the error would come from the program trying to put a buystop/sellstop at a point that isnt allowed to put an...
DEAR SIR I AM USING META TRADER 4 BUILD 840 , I WANT TO IMPORT EXTERNAL SYMBOL,  I HAD FOLLOWED THE FOLLOWING PROCEDURE A. I HAD OPENED THE MT4 , TOOLS , HISTORICAL CENTER, EXPORT ONE OF THE SYMBOLS AS TEXT FILE AND THE RENAME THE SAME SYMBOL WITH DIFFERENT NAME AND TRY TO IMPORT THE SAME SYMBOL ,...
Hi, I have been back testing my EA for a while now and would like to trade it live.    However, when I run it live, 3 different pairs for example,  I realised that that the orderstotal() was interfering with one another. if(OrdersTotal()==0)     {//---  Buystop and Sellstop     int...
  Web Trding (1)
Web Trading Our online web trading platforms, Visual Trading Machine, allows you to trade from any computer wherever you are in the world. Sophisticated tools and unique features make Visual Trading Machine one of the most sophisticated online-based forex platforms on the market. Real-time rates...
  Code Problem (2)
Hi, I have a problem: my program during the test send only one order even if looking at the charts it could do many more order. Please can you help me?
I am trying to run a test on the MT4 strategy tester on the 5m chart. I want conditions to be met on both the 5m and 30m charts. It appears to ignore the 30m chart condition so the condition is never true? // Input variablesinput int KPeriod = 14;input int DPeriod = 3;input int Slowing = 3;input...
Hi Guys...  I've created an indicator but I want it to be very un-obtusive.... I use a black background on my chrarts and I have set the 2 indicators to clrMaroon and clrDarkGreen... but they are still too visible for me... How do I increase the "black" level of the indis... Thanx... 
I have found the function ChartTimePriceToXY() to be quite useful but exploring in more detail there may be some discrepancies. Pick a candle using Time[] then use the code below to show the position of the candle as a percentage down the chart calculated using Time/Price & Pixels. I would have...
I have a certain condition in code where I define the BuyPrice total = OrdersTotal();if ( Bid >= BuyPrice1 && total <1)                                           // Buy Order 1   OrderSend (Symbol(),OP_BUYLIMIT,Lots,BuyPrice1,0,0,0,NULL,0,clrNONE);      if (Bid >= BuyPrice2 &&...
Hello everyone. I have MT4 840 build and I have following problem  with DAX index, it shows me in one click trading false vallues 1414.3 for sell and 1415.3 for buy (screenshot is old) instead of 11414.3 for sell and for buy 11415.3.  Number 1 in the beginning is missing. I have 840 and Win XP. Does...