Download MetaTrader 5

MQL4 and MetaTrader 4 - page 153

To post a new topic, please log in or register
PROBLEM: The Forex market is filled with information across a variety of currencies with different Technical Analysis patterns. With a 24-hour market, there is consistent information out there, but no real effective way to look at it all. There could be patterns out there right now that you're not...
  Error send (3)
Already many thanks for your help!  I'm going through a hard time finding the error. the "if" is working properly, but sometimes it does not respect the order. int TotalOrdersCount()  {   int result=0;   for(int i=0;i<OrdersTotal();i++)     {      int MyOrderSelect=OrderSelect(i,SELECT_BY_POS...
Hi all. I have inserted this code in my EA: if (TimeHour(TimeCurrent())>=7 && TimeHour(TimeCurrent())<=18)     {time_OK=true;}     else {time_OK=false;}    The backtest period going from 28 february 2015 to 28 february 2016. However, the ea operates only in march 2015(where it starts) and in...
Hi, I Have a script for Sell/Buy Limit and when i add a sell or buy limit order I note that i'm able to modify it with drag and drop. But when i try it with www.metaquotes.net I'm not able to modify. Is this issue from broker Or there is a solution for it? thank you #property show_inputs//#property...
Hi, I'm trying to code to find whether the last order was a buy or a sell. Seems simple. My typical code would be:  datetime LastOpenTime;int LastOrderTyp;double LastOrder()                                                                                                                // To find type...
Is there a way to execute an expert advisor OnTester, testing other expert advisors?. Let me be more clear, I have 3 experts: optimize.ex4 optimize2.ex4 tester.ex4   What I want is: To load tester.ex4 my expert advisor, and optimize with strategy tester optimize.ex4 and optimize2.ex4. In a way that...
//--- input parameters input int      lot_multiplier=3,base_lot=1,martingale_max=4; input int      cycle_fails=1,magic_number=123,slippage=2; //declarations for EMA cross    double CrossUp[],CrossDown[],smile_yes[],smile_no[],smile_nyes[],lot_size,Risk;    extern int FasterEMA = 1;    extern int...
there is a link on the left ads space when reading in 'code base' about the automated trading championship, and the link doesn't work: https://www.mql5.com/en/code
New article Graphical Interfaces II: the Menu Item Element (Chapter 1) has been published: In the second part of the series, we will show in detail the development of such interface elements as main menu and context menu. We will also mention drawing elements and create a special class for it. We...
Hi, I have a demo mt4 account with oanda. I placed a sell order with 0.50 volume size and it is giving me $0.50 a pip why isn't it $5 a pip I thought 0.50 was 5000 units of currency please help thanks
Hi,   Is there a way of calculating the number of thumbs up and thumbs down objects on the chart other than counting them manually? It tells me how many there are all together but doesn't seem to differentiate between the up and down.   Thanks   Elwise 
I'm running a tester with optimization with this expert advisor:   handle=FileOpen("data1.csv",FILE_CSV|FILE_READ|FILE_WRITE,',');    if(handle<1)    {    return(false);    }    else    {    FileWrite(handle, "Bidibidibadibum");    }    It works on my OnInit function, OnTick, OnChart, it works...
I'm looking for an update to a Metaquotes tutorial on best practice and practical steps for creating an indicator. I found https://book.mql4.com/samples/icustom but it's outdated and doesn't follow the new MQL4 routines such as OnCalculate. I'm looking at sample code which does include the new...
Greetings. I'm trying to access the results of the chart "Optimization Result" when i run a test. I don't really know how to use onTester(), as I can create messages, alerts, sounds, nor change variables. I dont really know when and how its called.   What I need to do is get the pass of Optimization...
Hi, how can I open an indicator out of my indicator? I see the following functions: ChartIndicatorDelete(), ChartIndicatorsTotal() but no function to open a indicator out of my indicator.
So I've written my first EA, which is designed to alert me whenever a Hanging Man candlestick appears. What I am now struggling to understand is, how to apply it to multiple charts. Do I manually have to drag it onto every chart (currency pair AND time frame) individually, or can I make it apply...
Can anyone help me with this code as the warning is coming up as "Returned value of 'OrderSend' should be checked, //+------------------------------------------------------------------+//|                                                           MA.mq4...
Hi, I have installed on my PC WINDOWS 10 and METATRADER 4 works well. I just had to login again on all my metatrader accounts because all passwords are deleted. Unfortunately, every week there is a new released, and every released i lost all passwords of my accounts! Does anyone know the cause?...
Hello, I have a number of variables like: int v1=1; int v2=0;   ... int v40=65; I want to find the 1st, and 2nd minimum value of these variables. The ArrayMinimum[40]={v1...v40} return error of "constant expression required"   Can you help me to solve this problem? Thank you, SCFX 
Hi there, I have this indicator:   The red line, and the other lines, as you can see stops 2 bars away from where the new line starts. I want the line to go in to the bar that breaks above it.  I've played around to try and get the line to go in to the bar that breaks above it, before the new line...
Greetings, I have the latest version of MT4 and the F12 function does not work for advancing the chart bar by bar. Nothing at all happens when I hit F12. Any suggestions on how to make this work?  Thank you Mike 
Hello,   i've just  installed my mt4 on w7, before i was using vista. I'm not sure off the version running on vista but on w7 it's version buit 950. the tradefromcsvfile expert advisor  (cf below) is not recognized anymore as an expert. Don't know the reason why it doesn't work anymore. If somebody...
Im logging trade times using OrderOpenTime() and OrderCloseTime(), which helps me keep track of my trades. However, at times, I need to manually close a trade that has been opened by my EA. But whenever I close a trade manually, the EA does not record the OrderCloseTime().  How can i get my EA to...
hey please guys any one can help me with my expert ..   i wanna make a buystop in the upper line of the ibands and a sellstop in the lower line of the ibands ..of the candle of 00:00  every day so i write it like that ..but it wouldnt work.. can u guys pliizz help me double BuyLevel1=iBands(NULL,0...
Hi, assuming that i'm viewing a one hour chart and i would like to know the current candle number from candle of four hours .( Is the current candle in one hour chart equal to (first candle , second candle , Third candle OR fourth candle)) I would like to show only the numbers as a comment....
i wang use an array[300] as indicator buffer and use setindicatorbuffer bind it ,is it allowed? should it use arraysetasseries fuction before use it ?  if  the array copy the data from an standard indicator buffer ,which will be more efficient through use a for loop and copybuffer/copyarray...
Hi i am trying to write a indicator  if previous 3 bars highest should be less than to its previous 3 bars highest. i mean if  previous 1,2,3 bars highest  should less than to previous 4,5,6 bars Highest.   but iam getting arrows for every bar! if( High[iHighest(NULL,0,MODE_HIGH,3,4)] >...
Hello everyone I am a newcomer to programming, I created a simple custom indicator (RSI) in a separate window, with arrows that appear in the graph window to signal me if RSI has crossed the level of overbought or oversold (the arrows have I created with the function ObjectCreate. My problem is that...
How to setup and run 2 correlated pairs  ?
//+------------------------------------------------------------------+//| Pips Indicator.mq4                                    |//| Chua Le                                                          |//| https://www.forex-tsd.com...