MQL4 and MetaTrader 4 - page 778

To post a new topic, please log in or register
  How NOT to Hack MQL4 (12   1 2)
Having been directedto an old post about making MT4 do what you really want, https://www.mql5.com/en/forum/124688 the code below was myfirst effort. Since it is a weekend (with no incoming ticks) I thought I wouldput the code in the EA init function. What is interesting about this code isthat by...
Hi, Can someone please tell how to put some text vertically or diagnolly starting from the High of each bar on the current chart I tried below code but it it showing somewhere in the middel of chart. ObjectCreate("test",OBJ_LABEL,0,Time[1],Close[1]);ObjectSetText("test",DoubleToStr(AccountBalance()...
  Trade Management (22   1 2 3)
Hello, I have a very strange thing going on in my Trade Management code. The posted part of the code is running in a loop, including the OrderSelect command. It is running on the tick. The code performs perfectly in the Tester. However running it Live, occationally it produces "Error 1", as it tryes...
hello, I have basically pasted the example in for arraycopyrates and cannot get it to return any bars. What am I doing wrong?? double array1[][6]; error = ArrayCopyRates(array1,"EURUSD", PERIOD_H1); if(error==-1) Print("copying rates failed"); else {...
Hey guys another question, I am trying to figure out the indicator side of programing. Having a few problems. First Trouble is one of the indicator buffers doesn't draw properly. A problem with buffer 3&4 which I basically want to make a Highest and lowest channel out of the first buffer... Here is...
Hi there, I'm a bit puzzled by this one. I've been running MetaTrader 4 for a couple of years now. No problems. However, I've recently purchased a new (Windows 7) machine and installed the MetaTrader software no problem. The email settings (under Options) are giving me trouble, though. I have...
Hello, I am trying to write a code so that i can work off the highs and lows of a specific bar per day.... The specific bar will be defined by time.... E.G. Just say i want to use the range of the 4 hour bar that starts at 4:00 and finishes at 8:00 every day.... obviously i wont be able to trade...
Hi, in attachment you see the source code of custom Moving average. I want to change it so that two Moving averages with several Periods combines together but the output shows only 1 Buffer. For example i have this changes for SMA mode like below: please help me what is here wrong or what should...
Hi I have a technical question about the Mt4: How were the Charts updated? If I have opened f.e. the M15 Chart, do I have, at the same time, the latest data for every other Chart? I´m asking for this, because I would like to know, if I use an EA on the M15 which uses serveral indicators on other...
Please note: I am very novice at MQL! Anyways, basically I am trying to create an indicator that displays text on the current chart based on conditions calculated from a different timeframe, i.e. in my case if previous close on Weekly chart was below 10 SMA then display "Sell" on current chart...
Hi, i would like to know, if there is a way to generate report of history (Statement.htm) to ftp (I already successfuly uploaded a file to my ftp so there is no problem). Is there some way to generate "plaintext" delimitered by ";" or ST else? Thanks for answers
Hello Everybody, My names Dave and I am trying to create a Zigzag oscillator indicator that resembles a MACD - but without the MA line. I have tried changing the code so as the ZZ appears in a separate window, THAT part worked. :) But I cannot seem to make it operate so as when the ZZ is up the...
When I write: OrdersTotal()==0 at EA this mean that no orders are open for this symbol or for All symbols? and if it is for all symbols how can i specify it for the symbol which I run the EA on it??
Just had a noob question that I'm sure has been asked a hundred times over. Nevertheless, I am asking it again hoping someone can just answer. I'm using the MarketInfo("USDJPY", MODE_POINT); function, and my broker, IBFX, is a 3/5 decimal broker. I tried to use a Comment(Point); and also:...
I am clueless on why the strategy Tester Bid price should pull the current Live Bid into the Strategy tester. As a work around I can use Close[0] as a fix, but would like to know why Bid, is not useable. It then brings into question backtesting of Bid in EA calculations.
New article The Role of Statistical Distributions in Trader's Work is published at mql5.com: This article is a logical continuation of my article Statistical Probability Distributions in MQL5 which set forth the classes for working with some theoretical statistical distributions. Now that we have a...
  ima and imacd (2)
ı try to mov on macd for signal, how can ı write it on mql4 ? for example MOV(MACD,3,E).
  MB TRADING (7)
I have created an Expert Advisor from this site http://sufx.core.t3-ism.net/ExpertAdvisorBuilder/index.html which only works on MB Trading MBT MetaTrader Strategy Tester but not on the Live Trading Session. Why is this so?
Do time frames always matter? For instance say I have a strategy that enters a bull trade if a doji star appears in an uptrend and a bullish trade if a doji star appears in a downtrend on a 4Hour chart. If you I use a 1minute test in the strategy tester, should I get the same results if I tested it...
I have been spending a lot of time trying to correct a StopLoss and TakeProfit problem.My Broker doesn't accept the StopLoss and TakeProfit in the same line of code as the OpenOrderBuy or OpenOrderSell. I have been very frustrated with this because of 2 reasons. I am not an expert Programmer and I...
Can someone spot what is wrong with my code. I only have one place in my code where any division is being done but I continue to get zero divide errors double CalculateLotSize(double EquityPercent, double StopLoss ){   //Code to Calculate lot size                     // Print("AccountEquity():...
Hi, Im new to MT4 and I want to write an EA, can someone please give me the cod or point me in the direction of a simple EA that triggers a buy or sale order when say the 2 lines of the Stochastic indicator cross above or bellow a level ( i.e 20 % or 80 %). Thank you,
On the EURUSD chart of my MT4 the prices from 10th June 2011 to 22 Sept 2011 and from 10th Oct 2011 to 29 Dec 2011 are missing. Does anyone know how I can rectify this? Thanking you in advance.
I have six EA's running on my PC and all are actively trading. Other than the "not so friendly" expert logs, is there a way to see which EA executed any trade? Is there a report I can generate that shows the magic number associated with each trade? Thanks to those of you who have answered my...
Hello Friends, I don't understand MQL4 language. I only have some basic HTML knowledge. I want that my mt4 have to trade automatically on following conditions. I have 2 moving averages on my chart. 20 EMA and 100 EMA and 1 Parabolic SAR. BUY IF : 1] 20 EMA...
Hi, I have an indicator which use information from another (higher) timeframe based indicator as well as current time frame data. this indicator is never displayed in the tester window, while others indicators works fine. what can I do to be able to display this indicator? thanks.
Hello, I have programmed an mtf-indicator and put it on a chart with a very long history. Now the metatrader wasn't running and working anymore. I cancel the metatrader with strg+alt+delete and startet my notebook again. But now the metatrader account doesn't open again. Can anybody help me?!
Webindia a creative web solution and web hosting company and it is the fastest growing IT internet strategy companies in India providing reliable and consistent web hosting services, creative web solutions and support to clients and partners. Webindia software development company provides the best...
I am a relative newbie in programming. Is it possible to change a line of code that plays a sound alert to one that sends out e-mail alert instead? if (SoundON == true && Bars>alertBar) {PlaySound("Alert.wav");alertBar = Bars;} I tried substituting it with if (EmailON == true && Bars>alertBar)...
Hi, I want to program an pivot - indicator, which isn't using any indicator buffer. I have already reprogrammed an existing ea: double Res3[], Res2[], Res1[], Piv[], Sup1[], Sup2[], Sup3[];int init(){   SetIndexBuffer( 0, Res3);   SetIndexBuffer( 1, Res2);   SetIndexBuffer( 2, Res1);...