Download MetaTrader 5

MQL4 and MetaTrader 4 - page 629

To post a new topic, please log in or register
  Bar time (5)
double h = High[1]; int t = Time[1]; MessageBox("H=" + h + ", t=" + t); The above returns the correct high for bar 1 but the time returnedis 13335535200. What is the correct way of retrieving the bar time?
Dear colleagues. I would like to offer you MetaTrader 4 API for .Net. This is application programming interface to remote control MetaTrader 4 terminal via TCP/IP from .Net applications. You can download demo version from mtapi4.net. More information you can get via email: v.demydiuk@gmail.com.
This chart was working fine before but for some reason when I scroll to the live edge all price action candles are not visible?! I have tried removing all indicators and the problem persists. All other charts are working fine, this problem is only affecting the EURUSD 15 minute. Does anyone know how...
can some tell me what does this mean in the journal
Hi, I need a EA to output a record into text file when opening a trade. Does anyone know how to make it? regards,thanks
I want to risk 25% of my equity, So I want to find out how much lots I need to buy. Equity() = $9000. Risk = $9000*0.25 = $2250 I want to use a 20 pip stop. So I calculate Risk/stop(in pips) = $2250/20 = $112.5. This is where I THINK my confusion is: I have a mini-account on a 3/5 digit quoting...
I am in the middle of re-writing some of my libraries into smaller groups, and while doing so I will be breaking out some of the tools that I have created over the course of years. Some I posted in the pass but most have never been seen before. The code that will be posted will be complete with...
  Time filter (17   1 2)
Usually time filter is widely used. For those that need Hours time filter here it is:      if(((Hour()>=StartHour && Hour()<EndHour && StartHour<EndHour) ||         (Hour()>=StartHour || Hour()<EndHour && StartHour>EndHour)))     EAActivated=true;    else    EAActivated=false; Can somebody share...
Hello, I want to get values from offline chart: (Open[1] - Close[1]) and (Open[2] - Close[2]) from Expert Advisor attached to 1 Minute chart. I think the best will be to make one expert attached to offline chart that set values, and then EA attached to 1 minute chart get these values. How to code...
Hello, I need to get values for Open[1], Open[2], Close[1] and Close[2] from Offline chart, BUT my Expert Advisor is attached to 1 Minute chart. How to get it?
This week suddenly my EA, sometimes and sometimes I just put the TP and I get that Broker is busy, until yesterday I never had this happen. In the demo accounts I have no such problems, but in the real s. Anyone know I can do? They try to fuck the EA?, Fuck them you can make a profit. TKN
Hi at all. I posted this good EA because the entry order is perfect...but the exit order and automatic contrary order not function perfect..your have any ideas ? where is the error in the code ? Thanks and Regards.
I tested expet advisor on meta trader EA tester,I noticed that The EA was not executed,, I checked the jornal what i saw is this...(2009.07.22 03:28:22 TestGenerator: unmatched data error (low value 1.4192 at 2009.07.22 13:15 is not reached from the least timeframe, low price 1.4193 mismatches).I...
I am testing my Slave EA on IBFX Australia ( US Currency ) and have the following problem: For Buy Trade I am using the following command: if (OrdersTotal()==0&&ask<=openprice){ticket=OrderSend(pair,OP_BUY,LOT1,newask,30*point,0,0,"HI",0,0,Green);} Please note that the value of the open price is...
  can not compile (20   1 2)
Hi guys, a bit of WHReoder program was suggested to me,I cant get it to compile. I am trying to get the last profit taken (order price level ) to use for continuation of trend for intri level. int GetHistoryOrderByCloseTime(int& tickets[], int dsc=1){  #define ASCENDING -1    /* https://forum.mql4...
Hi, Working on TF 5M I want to know a little of whats going on higher TF, like 1H and 1D. Eg. I want to know the day's high, and previous day's high.. simple:          int ToDaysHighestPrice = iHigh(NULL, PERIOD_D1, 0);         int YesterDaysHighestPrice = iHigh(NULL, PERIOD_D1, 1); But how can I...
Hi, I am trying to find a way how to automatically export history and real-time data so that I can build in real time the same chart as is in MT4 - just do not like it. For example: 1, M1 history 2, the last record is autoupdating with every change in quote (actual close, can change low or high) 3,...
Hello, I have an EA that uses 3 ima indicators ma3, ma30 & ma60. The default on the chart is a red line for each. How can I change the defaults so I can get a different line color for each one. I want to do it in the EA using the MQ4 code. I do not want to manually have to change it in the chart...
New article Who Is Who in MQL5.community? is published: The MQL5.com website remembers all of you quite well! How many of your threads are epic, how popular your articles are and how often your programs in the Code Base are downloaded – this is only a small part of what is remembered at MQL5.com....
I have read avout the problems of CompareDoubles. But would it be safe (and faster) NOT to use the coorect way: if( NoramlizeDouble(doubleValue,8)<0.0) ... if I only check the sign: if (doubleValue < 0.0) Alert("negative"); else Alert("not negative"); Thanks in advance, Carl
hi, i recently downloaded metatrader4, for the opening the account bit i filled in all my personal details then clicked next, then clicked next again, then it says wait and the load bar loads, the load bar loads up and it is meant to display the username and password and investor password but it...
Hi, I keep getting ordermodify errors 1 and 130 when executing this code: Please note that the "Lot" variable is predefined, and the call to the LOT() function is not being used right now. //Zero Stop      bool StopMoved;      for(int z = 0;z<=OrdersTotal();z++){   OrderSelect(z,SELECT_BY_POS...
Hi there, I would like to add a new swap group on MT4 admin, however, I don't know to do that easily without doubling the symbols... I mean, we can change swaps on symbols, but without adding a new symbol, we couldn't add a new swap on the same symbol... I don't want to see 2 eurusd pair...
Hi gurus I'm trying to design code that would limit the number of trades per (time frame) I am confident with my knowledge of making time codes thanks to the gurus in the forums etc. I'm considering making some code and OrdersHistoryTotal to accomplish this. Am I headed in the right direction ?...
Hi there, second time this happens ? Trading halted ? I can't place orders ? Someone any idea why ?
Hi All, I have been trying to get my EA to place an order with the same previous stop loss size (it is based on a candle low/high) for hours now with no luck. Basically, I would have to store and use the last stop loss value and call it for the order below. Please note the order below is seperate...
Yes Im new that being said Im new to codeing as a rule I trade naked however the pivot points calculater i use has tags I so like its accuracy for my setups problem is the tags on the levels are interupting my vision i wish to have the lines not the tags that read h5 lb target,h4 long breakout...
I am trying to use the method of opening lots based of the percentage of equity I want to risk. Print("Calculating Lotsize");            Balance = AccountEquity();            StopLoss = multiplier*atr24;            Print("StopLoss"+ StopLoss);                     //LotSize =...
Can you help? I am learning MQL4 and working through the MQL4 tutorials. I have been working on the ROC EA example and have made some tweaks to the code so all it takes for a trade to be made - either opening or closing - is the crossing of one specialised MA(Moving Average) over another. The MA's...
I WANT TO BE AN IB OF FOREX,CAN ANY ONE PLZ GUIDE ME WHICH COMPANY IS GENUINE AND GIVING LOW SPREAD AND HVE NO SCAM TILL PLZZZ