Download MetaTrader 5

MQL4 and MetaTrader 4 - page 136

To post a new topic, please log in or register
Hi there, Is there a limitation in MQL4 to write a FOR operator inside another FOR operator, aka nested operators? I'm analyzing 2 variables and to my understanding the "internal" FOR - on each iteration - should keep the external FOR's variable unchanged. However I'm getting erratic results as the...
Hi, imhaving a small problem with developing a code to determine the ‘x’ value whichis the index of the bar on the 5 minute chart with a range of 50 pips or more  between bar 1 and bar 8640. The Code keeps onreturning a value of 1 even when the range of the bar with an index of 1 isless than 50 pips...
Hi guys, I have a simple question: how do I get this: //——————————————————————————————| fine del programma |————————————————————————————————| instead of this? //------------------------------| fine del programma |----------------------------------| Thank you all for your cooperation
Hi all, I can't load some EA into my charts? I got th following message error: refer picture attached. I tried to copy paste the code into a new file, then saved and compiled... still not working. I can attach some EA but not all.... why? I have mql4 & Ex files. Please can yyou help? cheers
Hi there,   I installed a custom indicator, which works flawless for other people, but on my machine it simply does not show up. I installed it in the correct folder. It shows up if I look at the currently loaded indicators, it shows up in the journal "Custom Indicator ARROWS AUDUSD, M5: loaded...
Hi When adding objects to a chart via an EA, such as buttons & lines, I've found they're being added to all of the charts object lists, but not to the actual charts. So if I right click another chart I'll see the object listed in the list without the object being on the chart. So if I have 10 charts...
I have recently installed Mac version MT4 onto my My Book Air.It runs on wine and is by and large very good. However it seems impossible to instal three or four custom indicators on it, despite assurances from AXI that it is possible. Any contributions to solve this problem are very welcome. 
Hi guys, I have a question: Why in the indicator, the width of the line is more than 0 style is invalid Thank you for your reply. 
Hi All! I am currently learning MQL4 programming and I am so excited to have my very own expert advisor. Is there a MQL programming code that do the following: 1) Count the selected numbers of H1 candles from a specific time. e.g. from 2300hrs to 0200hrs 2) Determine the highest and the lowest among...
  Expiry date in EA (16   1 2)
How I can implement a validation of EA based on a date, if it is greater than that date show a message "the EA has expired..."?
Hello everyone, I have an issue with error 4051 as you can see in attached picture. Code for closing is:       for(int p=0;p<OrdersTotal();p++)       {        if(OrderSelect(p, SELECT_BY_POS, MODE_TRADES) && OrderType()==OP_BUY && trend_M5==false && ST_M5 > 70)       ticket=OrderTicket();...
i tried to create a EA for Binary option. My platform is MT4  (cretrader fx). but i can open the order. how can i use  the order send function plz help me to solve this problum this is the codes that i tried  OrderSend(Symbol(),OP_BUY,10.0,iClose(Symbol(),0,0),0,0,0,"BO exp:60",0,0,clrWhite);...
Hi I have the code below, that is a portion of code extracted from my project, which according to other examples I've read as well as the MQL4 documentation I've read, should work without a problem. I have alerts in amongst the code to inform me what is happening & the code appears to be working as...
Hi all, I have encountered an unexpected bug or error while using the ObjectSetDouble function, following is the program segment. #define error Print("Error: ", GetLastError());void Deserializer::Create(long id){   int len = ArraySize(this.obj);   for(int i=0; i<len; i++){      if(!ObjectCreate(id,...
hi, i want to create indicator that draw line at open prices on 10, 10 o'clock  bars.
Hallo, Is there a safety method to execute an exe-file from an EA?  traderdoc 
Hi,     I'm trying to automate an alert on  stochastic oscillator. I'd like to setup an alert every time the D and K line exit from the overbought and oversold area. example:k and d line go from 19 in t-1 to 21 in t0 , or k and d go from 85 in t-1 to 78 in to  How I'd develop this?...
Hello everyone, I have to insert a special condition in my marker. The histogram of the "Awesome" for a Sell must be red, for a BUY to be Green.......They do not need other conditions, such as negative, positive or particular values, but only the color of the spark plug 1 but with this my code does...
hi, i am writing up a log file from an EA. if the EA is restarted i want it to carry on writing to the same file... but append to the end of the file. initially this did not work for me, so i searched the forum and found https://forum.mql4.com/13774. i applied the directions there and my init()...
Dear all, I'm building a multiple strategy based on the RSI  levels: Between 30 and 70 use a certain strategy: Strategy N°0 Between 70 and 85 or 30 and 15 I use strategy N°1 And between 0 and 15 or 85 and 100 I use strategy N°2 (Although in order to move back to another strategy from srategy N°2...
I want my EA to enter trades only when spread is below 2 pips. What parameter i should use?
New article Working with sockets in MQL, or How to become a signal provider has been published: Sockets… What in our IT world could possibly exist without them? Dating back to 1982, and hardly changed up to the present time, they smoothly work for us every second. This is the foundation of network,...
  Newbie coding help (15   1 2)
Hi All, I need helping with fixing a coding bug. The EA is not doing what it is desired as losing trades are not closing at specified times with certain percent. Any help??  Attached is a time based stop loss EA. EA's purpose is to close % of a position after specified time has elapsed of a losing...
Hi I need to check the combination of my boolean functions which actually are situations that may happen in chart and are in extern. let you explain it by an example. I have 10 different functions that their names are OPT1, OPT2,.... OPT10. to check them I have to make groups of them, So I have to...
Hello, what MT4 indicators/scripts/EAs can you recommend to open and manage a trade in the easiest and fastest way? I imagine the following features: Open the trade by a single button click or key press.Set my SL and TP visually before opening the trade or immediately after that.The SL and TP lines...
New article Using text files for storing input parameters of Expert Advisors, indicators and scripts has been published: The article describes the application of text files for storing dynamic objects, arrays and other variables used as properties of Expert Advisors, indicators and scripts. The...
Hello, i'm searching for a reliable datafeed for backtest of e-mini nasdaq future in MT4,  i need  file in .fxt or .hst format anyone has a data provider to suggest? Thanks 
I simply need someone to create an indicator that plots horizontal lines on these certain numbers: Gold line (double width): 000, 250, 500, & 750Red line (single width): 075, 175, 325, 425, 575, 675, 825, & 925Red line (single width): 100, 200, 300, 400, 600, 700, 800, & 900Red line (single width):...
Hi. I would like to add to my open conditions sth like that: OrderOpenTime()  of last trade + 4 Hours <= TimeCurrent() plz help
You can be connected in some way an excel file to an indicator ex4 MT4?