MQL4 and MetaTrader 4 - page 264

To post a new topic, please log in or register
Would someone help me with some code to return total open chart count?
I have an EA which is working on the DOW on my demo account. I have just started it today and the index seems to gone through the trigger points but I see no trade. Can anyone assist as to why this is? Yes, I have set the EA to ''allow live trades"'. It is based on the M5 time scale. Its on MQL4 J
Hi,   Quite recently I finished a "previous" version of an EA.  I say "previous" because my idea was to use the Optimization process of MT4 to optimize the parameters. However, now, thinking about it I am wondering if this will be usefull or a waste of time. Because for Optimization I would use past...
Hi,  I closed a trade. So  the function OrderSelect( Ticket , SELECT_BY_TICKET,  MODE_HISTORY ) returns TRUE as expected.  I suppose closed trade can only be found   on   MODE_HISTORY    not   on    MODE_TRADES.  But why  OrderSelect(Ticket , SELECT_BY_TICKET,  MODE_TRADES) returns also TRUE ....?...
int Ticket, BUY;bool opened=0;//+------------------------------------------------------------------+//| Expert tick function                                             |//+------------------------------------------------------------------+void OnTick()  {//BUY=iRSI(NULL,60,3,PRICE_CLOSE...
In the code below I'm trying to count upto 36 bars then find the ratio of bull candles to bear candles and returns to log. But, the code returns 1 all the time. Ive tried + and % they work the way they are supposed to but not /. I cant see why this is?        void OnTick()    {   static int barCount...
New article Price Action. Automating the Engulfing Pattern Trading Strategy has been published on mql5.com: This article describes a process of creating an Expert Advisor for MetaTrader 4 based on the Engulfing pattern, as well as the pattern recognition principle, rules of setting pending orders...
  Checking Candle Open (41   1 2 3 4 5)
Hi guys, I'm fairly new to coding in mql4 and have really been trying to get my first EA to work. I would honestly appreciate help with the following. It's just a basic cross-over so-to-speak, but instead of moving averages crossing over, it's just price crossing over a moving average. I need an...
To determine what is the total closed trade, "OrdersHistoryTotal" is used. To determine what is the time of the last closed trade, "OrderCloseTime" is used. In the History tab, how to determine the last closed (or any closed)  trade symbol (eg; usdcad or usdjpy or eurusd etc...)         
I am writing my first EA (again!). I am trying to simulate an existing MT4 indicator so I can confirm my calculations are correct. So I am trying to calculate the ichi-moku calculations for Hourly and Daily in one EA and compare my results to the packaged MT4 one.  My issue issue is, when running my...
Has anyone found a good way to generate the code for an EA that you can trust on a live account? I have tried a couple of the "EA builders" but the indicators they offer are pretty limited and I am not sure how robust the code is. Any suggestions on which tools to use or am I just going to need to...
hello   i want to write a two line iside a  Button  like =>  Bid+"\n sell" i tray to use "\n" and it not working   ButtonCreate(0,"Button_buy",0,10,20,x_size,y_size,InpCorner,Bid+"\n sell",InpFont,InpFontSize,      InpColor,"clrRed",InpBorderColor,InpState,InpBack,InpSelection,InpHidden...
The expectation of last week’s meeting of the Federal Open Market Committee (FOMC) was enormous, however once more it seems as though the dovish influence on the committee have been underestimated. In focusing on “international developments” the market will take this to be a focus on the China...
Is there a way how to protect the Expert Advisors (EA) in MT4? e.g. When EA is open/modify in the MT4 platform, a password will pop up.
This kind of problemgenerally occurs when you have recently activated the Google AuthenticatorVerification and there is also a requirement of setting up the2-Step-Authentication in your Gmail Helpline Phone Number account. For this, you need to visitthe link after getting this job done, you also...
i can use ordersend to enter trades in metatrader 4. if i enter the dow etc, the trade is not executed. any advice?
Hello All,   I need to use SendFTP function in script. I am getting error of 4033. (cannot open file). Kindly suggest me something  Thanks in advance 
friends,What should I modify this code so that the open operation on the signal , is closed at the close of the candle ? I do not want to use TP and SL ! I'm still learning to program !I thank anyone who can help me! #property copyright ""#property link      ""#define MAGIC 30015//---- input...
hello all , I need help with code to make the EA open one deal per day , even the deal was closed ,   just one deal per day ???   and thanks in advance  
Hello guys, I have trouble with requoting error. Sometimes happens, not under our controls. But my problem is how to handle the error? Usually after OrderSend, every Expert Advisor stops until the server responds. But what happens when the server responds with Requote error? Does the script is...
Hello, I need to know how works MT4 server when there requoted order. When there is requoted order, the order request stay in the MT4 server. But meanwhile this server receive more order requests. My question is how MT4 server proceed the orders: first in first out ? or there are some other logic?...
Hi all, Any one can please help to change this bart of code, //-------------------------------    if ( Close[0] > Open[0] )           ObjectSetText( "lblChgBg", "ggg", 600, "Webdings", Blue );    else if ( Close[0] < Open[0] )    ObjectSetText( "lblChgBg", "ggg", 600, "Webdings", Red );...
//+------------------------------------------------------------------+//|                                                       222222.mq4 |//|                        Copyright 2012, MetaQuotes Software Corp. |//|                                        http://www.metaquotes.net...
Firstly, I'm fairly a novice with MQL4.  My indicator 'template' is based on EABuilder... most of what I do is swapping out conditions and customising the variables a bit, but never really writing code from scratch.   My issue is that when I'm adding if() conditions to a buffer, it all has to occur...
Im testing the EA ive attached when on strategy tester I test over a short period of between 01/09/2015 to 15/09/2015 there are no error codes and the EA appears to work okay. But, when i test on longer periods from between 04/05/2015 to  15/09/2015 i get both the following errors unkown ticket 63...
Hi, i was sold some EAs from some people on skype that a friend presented to me, they told me i have bought a life time licensed EA but i have my doubts about them and i would like to know if it was possible to check that a license is really there, they say the license is connected to my name so...
I have spent too much time to developed ea that will detect 3 low and 3 high in the loop bar count. I created three loop called Total_Bars1, Total_Bars2, Total_Bars3 respectively. Like give same low for minimum 1, minimum 2 minimum 3 also for maximum 1 , maximum 2, maximum 3. I created three loop...
I want my system to detect Last High and Last Low with loop bars. It should place order when high-low grater than 20 pips. I want to ea to place buy when market reach new high , that is two swing high must be seen. or two swing low for sell order Here is my codes. I have problem of subtracting...
Hello, when having a for loop  in a script   void function(void){for(int idx=0;idx < 10;++id){;}for(idx=0;idx < 10;++id){;}}  no compiler error. Having same in an expert, i get a compiler error about unknown idx in 2nd loop. What is the reason for that ? Thank you 
hi traders and coders i want osma indicator " o" cross alert with arrows. if iam seeing m15 chart.osma crossed in m30 also appear alert window (as same as 60,240....) same as above i need heiken ashi  color change alert. if iam seeing m15 chart.heiken ashi changed color ( 1st candle closed)  in m30...