Download MetaTrader 5

MQL4 and MetaTrader 4 - page 358

To post a new topic, please log in or register
Hi Suppose that today is MONDAY and I want to number of yesterday. I know I can use DayOfWeek() but if it's MONDAY I cannot do this | DayOfWeek()-1 |, because it returns 0 but I meant 5. And also if yesterday the market was closed what then?! I want to have last working day number. Could anyone...
In the 509 code the libraries handle the init() and deinit() events. But it does not seem to work in the new 600+ code. Do you have some suggestion, how to destroy the library without explicit call of some exported function?
Hello i would like to create an pyramide system together.I want to learn a lot from this project and get some respons if there are any misstakes made in the program. The idea is to create a little bit of programming each time and see if we can and with a nice program. Hopefully you like this idea...
First, I will reprint a paragraph of the English help file: We should noted the connection between the return value of OnCalculate() and the second input parameter prev_calculated. During the function call, the prev_calculated parameter contains a value returned by OnCalculate() during previous call...
Here is my code that worked before:   At top of code: AsianStartBars[14]; AsianEndBars[14]; int k=0; while(k<14) { for(int j=AsianStartBar1;j<iBars(symbol,tf);j++) { if(TimeHour(iTime(symbol,tf,j)) == ChannelStartHour && TimeMinute(iTime(symbol,tf,j)) == 0) {...
  OrderComment BUG!!! (12   1 2)
During these days I have noticed that the new versions (from 600 to 610 currently in use) have an annoying bug related to the property OrderComment, in practice if the comment is longer than 32 characters is omitted without any prior notice. For those trading systems that use the reading of the...
Need help... Only try to create something simple like this already drive me nut... I want to create some indicator that calculate the value of my Stop Loss (in Money). But, I don't know which script I can use. This is some thing that I want to create. Thank's for any kind of help...
Hi colleagues, Does anybody knows what function to use to load couple of indicators on a chart. I want to write a script to load some indicators. the problem is that - if I load a TEMPLATE it will clear all objects on the chart and I do not want to. it will be convenient if it is possible...
Ok. So, in my quest to find the perfect new candle code, I tried something new. Price based! if (Open[0]==Close[0] && Close[0]==High[0] && High[0]==Low[0]) Alert("New Bar!"); I put this in an EA and loaded on a 1 minute chart. Worked each time. Now, what I'm wondering is under what condition...
can we have it directly with the stdevOnArray ?
How to get Account Profit of an specific time? For example I want to get profit of an account since first day of registering to yesterday. Should I utilize AccountProfit()? How?
Hi there, We created a small control panel with check boxes and one button for our EA. Generally it is working well and properly but sometimes we experiencing the "array out of range in 'CheckGroup.mqh' (164,16)" error message in the expert tab and the EA stop working. This file is a Metaquotes...
Hi! I'd like to insert data directly from a MetaTrader 4 EA, and it hangs at first line: mysql = mysql_init(mysql); Here's my code, where did I make a mistake? Thanks! #import "libmysql.dll"int mysql_init(int db);int mysql_errno(int TMYSQL);int mysql_real_connect(int TMYSQL, string host, string...
Hey guys, I try to optimize my indicators a little bit by implementing new MQL4 code. I have some general questions about data types. When I need a high or low of a bar, I used the data type double. But now I see that float uses only 4 bytes instead of 8 bytes used by double. When it comes to prices...
  New candle (10)
Anyone got a good piece of code for build 600+ that will determine if a tick that came in is the start of a new candle or not? The code I have doesn't work anymore.
I have a simple indicator whereby I check for a condition, and then send an email when the condition is hit in the "start" section of the indicator. It works fine, but when I add the indicator to my chart, it seems to get called every 1/3 second or so. My goal is to call the routine only when a new...
Hello Metaquotes Is there any Solution for MAM/PAMM Accounts for multicurrency Clients that work correctly? Example: MAM/PAMM is nominated in EUR. 1 Client 20.000 USD 2 Client 30.000 EUR 3 Client 15.000 CHF All under one MAM/PAMM Account? My last Info was it´s not possible for each Currency i need...
I'm not sure what's happened but it looks like mql.exe has been replaced with cpp.exe in build 616 ?? I did have sources outside of the MetaTrader folder, and was running mql.exe to compile, and then copy the ex4 into the data folder. That doesn't seem to work now with cpp. I get... MQL4/MQL5...
Hello, How to remove the warning : possible loss of data due to type conversion FromDoubleToInt.mq4 20 9    //+------------------------------------------------------------------+   //|                                              FromDoubleToInt.mq4 |   //|...
Hi, Im using MT4 build 625 and I see price differences in what's shown on the charts and on the terminal. See the blue rectangles on the attachment below: The diff is (in my case) 0.5 pips. Is this is a bug or some new feature in MT4 ? :) Cheers, Serkan
  ERROR 4105 (1)
Hi i'm trying to build an hedging EA (to learn mql4). Here's the code #define MAGICMA  20141405//--- Inputsinput double Lots     = 1;input int    sl       = 5;input int    tp       = 10;float NetLots(string symbol)  {      if (OrdersTotal() > 0) {         double shorts = 0; double longs = 0;...
What is the normal wait time?
I'm trying to build a dashboard as need as much real state as possible to fit all the information I need to be able to see. For this reason, I was trying to hide the date and time scales, as I'm not going to trade from the dashboard itself. But when I've used the chart properties and have tried to...
Hi, I am trying using WindowScreenShot() in one my EA that running on my VPS. I am using with this format: WindowScreenShot("auto.gif",550,300); It takes black screenshots from chart. I tried this function on VPS with win server 2003 & 2008 and for both same results. When run EA on my PC(Win 8.1)...
Hi Guys About two years ago i downloaded and installed Trendlord (its an indicator) into mt4, used no problems, today, with the same broker i have downloaded another copy of mt4 so i can work two charts. I can set up both my charts the same except for the indicator Trendlord. I have copied to...
I was wondering if strategy tester can calculate more than one close points when testing your expert adviser? It seems that I'm having problems getting the strategy tester to show more than one close points with my EA, another words, strategy tester will close the whole lot when it should be...
dear sir, in Broco Trader 4.30, how can i find the CRUDE OIL (MCX) CHART, i found most of the MCX commodities but i cant find the curde oil Chart in MT4 so please suggest me how to find the CRUDE OIL (MCX) CHART.
Dear all, I want change color of bar chart like Heiken Ashi indicator. Can anyone help me this code? For example: when RSI > 50 Bar color is red, RSI < 50 bar is blue. Thank you!
Problem Resolved [Please Delete Thread] Thank you