MQL4 and MetaTrader 4 - page 216

To post a new topic, please log in or register
Hi Guys,,apologize me if my english is bad,,I'm from Indonesia,,and I want to make an EA but I got the problem How to close all opened order and all pending order if one of the opened order is already take profit? I'm very appreciate for all the forum to help me :D thanks.
Dear all, I am creating my system to open two pending orders - BuyStop and SellStop Next, I want it to Close or Delete one of the Stop order when Buy or Sell is executed. Example: Case 1: BuyStop and SellStop are Placed BuyStop is executed - Buy. Then, SellStop should be closed. Case 2: BuyStop and...
Hello  I am looking Elliott Wave tools for mt4, such as the video https://www.youtube.com/watch?v=6TNAdYmmuTk  or something similar Thanks   
Hi, I have got some problems with introduce my conditions in reality. If any good person coul help me a little bit, I would be very gratefull.  How to convert these conditions below to code? For example every candle is 1H candle-> -positions can be opened from e.g. 08:00:00 to 21:59:59...
OP_BUYLIMIT Order placed at 1.09516 with Fill Price at 1.09264. Error says Fill Price is invalid but it looks correct to me. HELP. Thanks, Jim
I've issued an OrderSend as an OP_BUYLIMIT and received an Invalid Price error. The Ask Price and Entry Price: 1.09516, The Fill Price: 1.09264. The  SL Price: 1.08944, TP Price: 1.09644. These prices seem correct to me so I don't understand the error.. Thanks, Jim
Want to ask a problem, how to read today high and today low before certain time? ex: today high and low from 0:00 to 13:00, on 13:00 make a decision. already tried double todayHigh = iHigh(NULL, PERIOD_D1, 0); but didn't do anything double todayHigh = iHigh(NULL, PERIOD_H1, 1); open in wrong desire...
HelloInitially desculpelo for bad English. I am with following problem. I write this code: extern int MagicNumber=10001;extern double Lots =0.1;extern double StopLoss=60;extern double TakeProfit=30;extern int Slippage=3;int operacao=0;int ThisBarTrade=0;double resetlots=Lots;int resultado=0;int...
Hey guys, before starting i want to apologize for my bad english. I will try to explain my problem and hope you can understand me und help me. With this code below my text i'm trying to scan a lot of forex pairs from one chart. The code should run the main part only in the first minute of an hour...
Please find the below code and here's the problem: datetime fromDT ="00:00",            toDT ="07:00"; int      fromBar = iBarShift(NULL, 60, fromDT),            toBar = iBarShift(NULL, 60,   toDT),           length = fromBar - toBar + 1,            HHbar = iHighest(NULL,60, MODE_HIGH, length,...
I try to test my EA and problem is I don't know how to create testing scenario logic is - if indicator A got value N and indicator B got value M - open position in real life i need to wait hours to get this match and ops error in code, fix and wait again  is there any way to simulate market for...
We haven't seen any changes since the 950 build on 22nd December 2015. Does anyone have any idea of when the next platform build might be released ? I'm asking this because I have a pending enhancement for querying the Windows Scaling that was implemented a few weeks ago.
I am trying to code an EA, that will check for certain criteria across multiple currencies, and if they are satisfied open a trade. To try and get the code to work the only criteria I am currently using is open a new bar (I'll add more when I can get this bit to work). I'm also limiting it to 3...
Hi can anybody suggest why the envelopes are not showing when I drop this on a chart? I believe I have coded it correctly ?? Thanks 
Hi,  Can anyone suggest a fix for this compiling error on the || or statement:  if(PriceHighBack>=BolUpper && PriceMedian<BolUpper || PriceHighBack>=BolUpper && PriceMedian<PriceMedianBack) I get this compiling error: check operator precedence for possible error; use parentheses to clarify...
  Client API (1)
Hi,  this is directed to MQL4. Is it possible to get a free API for some currency pairs and gold prices in various currencies?   thank you   Jack 
Hi, everybody. Had this ea but i want to opposite of that ea. When it buy i want SELL and when it sell i want BUY. And i don't know what should i change. :(   Help me please!!!      //+------------------------------------------------------------------+//| Script program start...
hi. i run my ea successfully on several broker platform (4 or 5 digit ) , but when i run it on windsor platform i have this error. for windsor the symbol is named as " EURUSD@" as below picture , and the error code is:     and the error code refer to : ================================== and if...
Hello to all, I have a problem with iMA function for calculating the moving average. The function almost always returns the correct value but in some cases of some currencies returns to ZERO. I am making a simple calculation of the moving average of 200 periods eg. SMA200 = iMA (Symbol iTFMinute,...
  Text Label Position (13   1 2)
Hi, Please help me with the Text Label Position ( I want to move it to the left side As it is showing in the attached photo) I'm try my best but i couldn't find the solution . int start()  {//---                           double priceH=iHigh(Symbol(),PERIOD_D1,1);...
Hello, my problem: Two classes, one inherits. But, the inherited class has to be constructed with a parameter... And I can't make it... FatherClass: class clsGauss01      clsGauss01(int Index); SonClass: class clsGaussTS01 : public clsGauss01(0) But the Message: '0' - declaration without type...
Hi all, Is there any parameter or workaround to make the compiler rename the ex4? As far as i understand the compiler will generate an ex4 with the same name of the originating mq4 file, but i'd like to be able to change the name based on code.  For example, if i have an EA called MyEA.mq4 i could...
Hi, I'm making a GUI for my EA.  I'm using this code https://docs.mql4.com/constants/objectconstants/enum_object/obj_button What I want to do is link a function to a button, so that when I press it, the function gets called. My ugly workaround as of now is:  void OnTick(){        if...
Which do you use for backtesting     MQL4 MQL4 Birts MQL5   This questions is primarily for those who use MQL4 for algotrading, I have in the past converted my EA into mql5 for purposes of backtesting accuracy and I am considering doing so again.   Regards   MNt
Hi, I want to draw multiple letters above the chart. The problem is that the letters I am currently drawing are relative to window, not to chart. How can I change that? This is my code :     for(int i=0; i < limit; i++) {           ...        string name = "symbol" + i;       ObjectCreate(name,...
Section 1: (input data for script, indicator, EA) input color clr=clrNONE;  // or extern color clr=clrNONE; declaration by user OnStart()       // or OnInit() Alert(clr);     // return 255,255,255 or Section 2: OnStart() {   color clr=clrNONE;  // declaraion inside   Alert(clr);  // return clrNONE }...
Hi, please, it is possible... launch an Indicator without the confirmation-window (that appears before running the program)? I see that for Script it is possible set the presence of this confirmation dialog (#property script_show_confirm), but it seem that doesn't exists nothing of similar about...
I have written an mt4 EA. I want it to display my contact information in order comment. What exactly should i write in source code if i want my EA to display my email id that is, "sammiawan@gmail.com" in the order comments and charts.Thank in advance.
  Help Please on iHighest (12   1 2)
i am new to MQL scripting and looking for some help.   Can someone please help me here to understand this piece of code? Is MaxH/MinL looking into the future by period bar to find the highest High and Lowest Low in "period"?   The i as Start parameter in iHighest means High is calculated from the...
Hello everyone. I would like to modify this code so that the alert, instead of appearing at the opening of the candle, detects the conditions after a few seconds. Thanks for everything, Massimo. int start(){if (BarStart !=Time[0]) {  BarStart = Time[0];   //Indicator Buffer 1            if (...