MQL4 and MetaTrader 4 - page 297

To post a new topic, please log in or register
Hello! Is here anybody, who collected historical intraday data (best 1 min) for some currency pairs? (eurgbp, eurcad, gbpcad, gbpchf) They offer to buy, but not gbpcad, and the quality might be not that good. thank you in advance! Peter 
  How the Program Flow? (12   1 2)
//+------------------------------------------------------------------+//|                                                 chuale.mq4 |//|                        Copyright 2014, MetaQuotes Software Corp. |//|                                              https://www.mql5.com...
Hello, I've written an EA which trades Pivot Points, you'll find their calculation inside the EA. It may look more complicated than needed, but I wanted to use a certain hourly Close for indicator calculation. This works fine. What troubles me is the implementation of trend filtering. I'd like to...
  DayOfWeek() (16   1 2)
Hi guys, Today is sunday. I run this code Comment(DayOfWeek()); and got 5 (it means friday). I guess it came from the last known server time. So, the server time has stopped on friday. My question is, how can I check whether today is saturday (6) or sunday (0)? Or: How can I check whether the market...
Hi gurus, I seem to be having a problem with my OrderClose() function. I want to close all orders at a specific time. I used the code from RaptorUK's thread:  https://forum.mql4.com/48352 When it reaches the specific time it doesn't run the function and does not close orders; any ideas? Below is the...
Windows xp restart everytime when running mt4 after recent update (22 May)
Hello, Can I get last time for any ticker from Market window? Regards.
How can I to a datetime comparison? In my code, I use one datetime variable, lets say: datetime forbiddenDate; And some time during my strategy I give to this variable a value forbiddenDate = Time[0]; Then I want to check date to see is it good time to open if(forbiddenDate != Time[0]){//open} But...
Hi, I seem to be having a problem. I want to select an order and then when that order is in a certain amount of profit I want to send another order. Below is my code. When it reaches the certain amount in profit it places continuously as it oscillates around the profit point at which I want it to...
New article Tips for Purchasing a Product on the Market. Step-By-Step Guide has been published on mql5.com: This step-by-step guide provides tips and tricks for better understanding and searching for a required product. The article makes an attempt to puzzle out different methods of searching for an...
Dear Colleagues, since few months I`m succesfully trading with Stochastic and MA on 1h/4h charts. Few days ago I decided to automate my simple strategy, but I have some problems with opening and closing trades. The rules of my strategy are very simple: Open Buy trades: - if price is above Moving...
Hello, how to control number of trades per currency ? For example, for current chart with running EA (for example EUR/USD), I would like to open maximum 1 trade. How to control number of open trades ? On this forum I found something about OrdersTotal(). How to use it to control number of open...
Hi all, i'm a newbye mql4 developer and i need some help from you. I have two tasks to do: 1 - Save real time data (every second) from all assets with these information: AKS/BID price, LOW/HIGH price, time, some indicators (stochastic, macd and others). I read that for the first information i can...
Hi, how do I remove duplicate values from an array? I have tried to add a check to stop it adding duplicate values in the first place - but this doesn't seem to work....
Hi, I have a simple check in my EA iOpen("EURUSD",1440,1)<Close("EURUSD",1440,1) - meaning did the price go up? on the tester it does bring the correct information - open> close - but on the live EA he 'thought' the opposite. how could that be? I am running it on 1M chart in both cases. Ta IYC
I have this class OrderInfo Why is it if I use orderInfo = new OrderInfo() ; orderInfo.setStopLoss( 0 ) ; Then I pass the OrderInfo object to other object from class Executioner executioner.setOrderInfo ( orderInfo ) ; Definition of function setOrderInfo in class Executioner: public void...
Check your extern bool variables, they are not giving the correct settings, they are hit and miss.
Hello, i wont to ask if it is possible to get a info abaout the zoom faktor fromthe aktuelly chart. You all know the zoom in and zoom out button, I must to know for a Indicator whichZoomlevel the are actuelly, gives it there a soultion for to get know how big orsmal the zoom is?
Hello again, the first time looking for string-Values in MT4 out of a c++ DLL takes me a day without success :-(  And I've been working with the example first ! All my calculations are working but strings.... The story: c++      ---------------------------------------- I want to code with 'wstring'...
what is copy trade? How can I start copy trade?
I am new to MQL4 program. I want to write an expert advisor program and test it with MT4 historical data, not live data? It would be appreciated if someone could provide me some ideas on how to do this. Thanks, Gorton 
Hi guys, I wanted to generate an offline chart (by the original PeriodConverter script) that is equal with the donor one. For example: EURUSD,H4 >> EURUSD,M57 (this came from EURUSD,H4 by InpPeriodMultiplier=1). I used H4 chart as donor instead of M1. I found that there is a missing bar (index 1)....
struct MqlTick   {    datetime     time;          // Time of the last prices update    double       bid;           // Current Bid price    double       ask;           // Current Ask price    double       last;          // Price of the last deal (Last)...
What MM software do you use for your FX MM needs? There is Market System Analyzer from adaptrade but it is buggy laggy and weak.. not for FX :(
Hi Guys, I am working on mql4 for almost 1 year and I have learnt so much thing from your comments. however I couldn't understand OrderTicket .  When I open a trade how could I know the number of Ticket. When ea opens trades, each trade will have different ticket number and then I am not able to...
I would like to know how many minutes have passed since EURUSD was exactly 30 Pips lower than it is right now. How can this be done with MT4? 
Hello, I want to find MT4 build from mql4 code. How can i do this? The reason is my programs work only in MT4 build 765 or highter. Thanks 
SackMyCook
  EA or script (5)
For example, I place an order manually. I have to go away from the PC and leave it open. I want a trailing stop loss to be applied once the order is in profit at a predetermined number of points. Is an EA best or can I apply a script once the order is opened?
Today I wanted to dig deeper into canvas and controls objects and stumbled upon the datepicker datedroplist and timepicker mqh. All those includes require a file themselves called #include <Tools\DateTime.mqh>  This folder and DateTime.mqh file seems to be missing on my terminal. I was not able to...