MQL4 and MetaTrader 4 - page 1310

Hello, I have a double value of 0.00045 and need to divide it by 2000 to get the average value. But the result I get is 0. Is there a function to do this?
  #include  (1)
I do not have any problems using #include within indicators, but when using in EAs it does not seem acceptable. e.g. if I #include the Data Defs for the EA it is only recognised if they are already there so will not compile!
[Deleted]
hello world, is there a way to tell a custom indicator not to report "initialized"/"deinitialized" every time I change timeframe on a chart? thank you in advance even if there isn't :)
How do I specify the bar duration and how do I detect a new bar or the closing of the current bar, in MLQ4? I know M15 refers to the 15 minute bar but how do I declare that in MLQ4? Thanks for any help.
¿Alguien conoce algún EA que realice compra o venta según cambie la tendencia de cualquier EMA?
[Deleted]
I am trying to code an EA and at times I want the EA to close all open orders. I am using this code: if(CloseAll==true) {for(i=0;i<OrdersTotal();i++){OrderSelect(i,SELECT_BY_POS,MODE_TRADES);if(OrderType()==OP_BUY){OrderClose(OrderTicket(),OrderLots(),Bid,3...
[Deleted]
Does anybody have a multi time frame alignment indicator which align the time frames 4H, 15M and 5M time frames using the Stochastic Oscillator in order to derive any buy and sell indicators for the platform? Regards Todd
[Deleted]
Hi...i'm trying to writer a program that needed to reset the "int" value to "0" quarterly... Can anyone guide me to set "integer value" to "0" in every 15 minutes??? Any suggestion will be deeply appreciated...
Hi, I have been tryin to make an EA on the basis of Four moving averages crosses...using different periods.. during my search i understood the basic idea for two moving average crosses... could anybody tell how can four or more moving averages crosses can be used to generate buy and sell signal?...
[Deleted]
Usually I’m trading one currency pair withminimum 4 different intervals. In each chart I’m using 2 EMAs, MACD and FullStochastic. Can anybody write an EA for this kind of setup? I enter into atrade only when all my indicators are fit to my criteria. Zsolt Szabo (786)320-0759 Thanks
[Deleted]
  MT4 and DDE  (2)
MT4 and DDE I've got IBFX's MT4 and I can't get dde to work in Excel. Standard format is: =MT4|BID!EURUSD, etc... Where MT4 is name of program exporting dde. I'm not sure if this name would describe ibfx's version of MT4... I've already enabled dde in MT4 and turned on "Transition formula entry" in
[Deleted]
I have an indicator in separate window I'm writing, but every 5 bars or so, the lines dissappear and then re-appear, almost like a refresh. It's slowing down execution. What are your thoughts on the cause of this? How can I resolve it?
I think that analyzing one chart and using it to build an MTS is utopia, and I realized that a long time ago. Many EAs write excellent MTS for EURUSD, but lose money using another currency, for example USDJPY. Why, for example, in the next year the EURUSD chart will not change to USDJPY chart and
[Deleted]
Hello. What is a flexielib.mqh file? Where can we get it? I tried searching for it but nothing. Thanks for your help.
[Deleted]
  Refreshrates()  (15   1 2)
Could someone explain what is happening with refresh rates... the documentation hasn't really answered my query. Suppose I send an order and get Err 129 Invalid Price . My way out of the error is refresh rates... What happens after you've refreshed? I understand that tick info is updated but what
Hello, I am looking for an indicator that compares the close of the candle to its previous candle close and show signals accordingly. So, if the canle close above the close of the previous candle, it gives a buy signal and vice versa. Also, if the current candle prices moves above the high of the...
[Deleted]
Is it possible to have an EA only run on a bar close of the chart? Thanks in advance, Ed
I have written the header file and compiled the exe file in /experts/include folder. The function accessed via the include works when placed in line with main code. The indicator code compiles with no errors. When I run the indicator it runs init() (sets up separate window with levels etc), but...
Hello, I am trying to use the existing Accelerator indicator and put it in array but my array doesn't seem to give me the correct figure. Can someone point out the mistake? The Original Accelerator indicator below. //+------------------------------------------------------------------+ //|...
  Array Help  (4)
Hello, I have got an array of [1,2,3,4,5, ...] How do I change it to [...,5,4,3,2,1] ? Any help is appreciated. Thanks.
[Deleted]
Whoever is interested, get in touch. Task: give a mathematical definition of a price chart with justification. Richie: I would call it a process. Randomness of traders' orders opening in time + unpredictability of lot sizes , if I may say so. Or again someone will say it's not all random. **** The
I would like to have an EA coded using mt4. Can anyone recommend a good coder who is trustworthy, reliable, excellent at what he/she does and who charges a reasonable rate. Thanks - RAM
Hi everybody i would like to place orders on different hours especially when release different news but there is no possibilities in Meta trader. I wonder how can i solve my problem please help me!
[Deleted]
Hello, I recently tried my new Expert advisor, but it didnt work as it should. I couldnt figure out where the problem is, but now i know. It seems like the iStochastic returns wrong value. Look at the picture in attachment. You can see here clearly, that the value of one stochastic is around 88, and...
I wonder if someone might try and explain how this line works from the terminal function in the mql4 book I just cant get my head around it Mas_Tip[OrderType()]++; // Amount of orders of the type How is that one line putting the correct amount of orders of each type into the separate array elements...
  Max SlipPage  (3)
In MQL4: How can I set the Maximun slippage in order to avoind this message of MT4 (and the order is not generated)? " requote xxx / xxx for open [buy/sell] [lot] [currencypair] at xxxxx sl. xxxx tp. xxxxx" I have tried with 3 and then 5 but sometimes I still get the message and the order is not
[Deleted]
Hi, I'm slowly learning about coding MQL4, and while I'm getting to grips with modifying existing code I am still quite a bit off the mark on writing my own indicators from scratch. To help learn, I'm trying to write a custom indicator ("Balanced") which draws a line using data from 2 other custom...
I am learning this new launguage while trying to do some liitle things. Following is the sample code in the Start function to define a user function. I have 2 problems here. 1. The way I defined the function and/or called the does not look right. Hence I am getting lot of compilation errors. 2. In...
[Deleted]
Hi I recently installed FX Multi-Meter 111 on my meta trader and have all these very large fonts showing over everything. I am on interbank running Vista and meta trader 4 Is there a fix for this problem?? I am relatively new to this and any help would be appreciated Thanks in advance ron W.