Download MetaTrader 5

MQL4 and MetaTrader 4 - page 667

To post a new topic, please log in or register
I have written a C++ DLL to calculate an sma using a recursive formula which should update on the completion of a new bar only, and most of the time it works OK. However, occasionally it updates on the newly forming bar and the sma shoots off at a bizarre angle as shown in the screenshot below. Once...
  Hello All.. (4)
Hello all.. My name is kevin and I'm very new to programing... infact, I have no experience it writing code and eager to learn the process and the language. I'm looking for help in creating a good e.a. Any takers?
Hello; For first, excuse me for my english, my level running low (verry). I make a DLL in C++ langage for create a button window in chart of metatrader. If i work with indicator script, my dll draw the button on chart correctly. But, with the same code in expert advisor script, my ddl does not...
I am using Windows 7 starter on my mini laptop, I installed Instaforex metatrader software and it is not loading giving a prompt that software is not compatible. Other MetaTrader 4 software is running ok. Anybody has a solution on how to run the Instaforex metatrader 4 platform without problems on...
  Tester Issue. (2)
MT4 Veterans, I am having problems with tying out expected trades with tester trades. To improve the quality of my testing, I downloaded tick data from a broker in CSV format to over-ride the MT4 tick generation process. As a part of this process I utilized a script which took the CSV file and...
  Kelly Lot Help Please (27   1 2 3)
I have been looking and learning and have found a way to start developing this mm system, granted I am not a coder by any stretch on the imagination. I have attached a very simple EA just using a Daily Pivot nothing elaborate in an attempt to try and get the Kelly Lot Size going. I would appreciate...
Hi I have many instances of MT4 running with different brokers. I have not had any issues for quite a while. However after version 402 I cant get the LiveUpdate to work on any of the instances. This tells me its an issue on my PC as oppose to a particular instance. The error I get is Server: No...
I searched to see if anyone else is having this problem, and what can be done. Build 409 takes forever to launch. I reverted back to 402. Big difference. Is anyone noticing this? Can anything be done? I really do not want to upgrade as it's causing a problem in launch time. Any solutions to this?...
Here is the portion of my code in question /*    int counted_bars = IndicatorCounted();    i=Bars;      if(counted_bars>i) i=Bars-counted_bars-1;     */          i = 100;     while(i > 0)     {       string match = List[0];             m = 0;       for(j = size - 1; j >= 0; j--)       {         if(...
Hello, I am frecnh and my english is no perfect and it will be pleasant to ignore it. I have a problem with the "start" function"; it is run at every tick, yes? But in my EA algorythm, ther is a function wich is waiting for a new candle and I do not want resarting the sart function at every tick...
Could someone from MetaTrader (or someone who has found a way to do this) state how it is possible to have more than MT4 running (from different brokers) connected to one excel spreadsheet please? I have seen articles on this subject but no solutions. Thanks.
OMG,, this is driving me crazy.. Long positioin works fine but why short position doesn't !!! I checked Symbol, MagicNo, Everything... Now,, just gently requesting the help from your fresh eyes,,, My eyes are no good any more.. Any comment and any suggestion will help, Thanks....
hi i'm having trouble with a basic indicator. it should only draw the pivot line the same way like a moving average line is drawn, but it will not work. it draws a horizontal line very far off from where it should be. please help me point out the mistake i've made, thanks! #property...
Hello, I want to attach my Expert Advisor to 7 Minute chart(offline chart updated every tick), but EA won't work on that chart. I have heard that Script does not has that restriction, but unfortunately is executed only ones. My question is how to convert EA( for example Moving Average Expert...
  Error in OrderClose #129 (16   1 2)
I am doing an EA of triangular arbitrage.. when profit reach 22 or above the orders should be close but when I'm trying to close the orders I got an error of 129..void checkProfit(){   double profit=0, p[3];   int ticket[3];   int minute = TimeMinute(TimeCurrent());   string date_time =...
if(TrailingstopUse == true && Trailingstop > 0 && open_buy > 1 ) {                                        if(Bid-AvgPrice>Trailingstep*PointDigit) {                                        if(OrderStopLoss() < Bid - (TrailingSinglestop+TrailingSinglestep-1)*PointDigit)...
Hi Programmers! Can we send signs from an EA of one MetaTrader to the another EA of another MetaTrader platform? The two MetaTrader run on the same computer. Relative
Hi, I am trying to run optimization on my laptop with 2.4 Ghz and 2 GB RAM I have 8 parameters to test and running against 8 months history data After 6 hours it progresses 43 / 10 496 Is this expected to be this slow? Above speed shows I have to wait for 65 days !!!! If i run this in a high speed...
hi forum! i use 6 moving averages and i want to know if the current price is over or under them. therefore i have to know the highest value of the mas and the lowest. i thought there is something like: double maximum = highest(ma1,ma2,ma3,ma4,ma5,ma6); double minimum = lowest(ma1,m2....); but that...
I am working on coding a breakout strategy on an hourly chart. I want to check on the new opening candle if there is a 3 pip break of prior close. I do i go about doing this on an hourly chart. I was thinking about using MarketInfo(Symbol(),Minute,High[i]) or something like that but how do I know if...
hello i'm quite new with metatrader. i moved from ninjatrader and i miss a very nice feature: drag & drop support of an existing stop loss or not filled buy/sell order. for those your do not know ninjatrader: a line with a (X) symbol including size of contract/lot will be printed. then you can...
Здравствуйте. Раньше я работал с MT5, сейчас возникла необходимость работы с MT4. Мне нужно протестировать советника на временном периоде 2000 - 2005 гг. У меня ничего не выходит, вот почему: Сначала я пытался просто запустить тестирование, была ошибка "TestGenerator: no history data". Потом я...
Hi, I have below positions Long-1 lot - @1.34 Short-2 lot - @1.35 Long-5 lot - @1.33 Can someone please tell me the formula to calcuate the break even price when LONG profits (bcz total LONG lot size is bigger that SHORT so at some point it breaks even) thanks in advance
I'm trying to write a custom indicator to send me an email when a certain pattern paints on my charts. I'm calling sendMail() from start(), but it isn't firing every time. I had the indicator running on 15 charts with 5 other indicators so I thought that might be the problem. I removed all...
Hi there, i want to ask simple question, i've been searching through this error for quite a long time my code is if(iBands(NULL,0,20,2,0,PRICE_CLOSE,MODE_UPPER,0)<=Close[0]) // hit upper bollinger or pass         {            ticket=OrderSend(Symbol(),OP_SELL,0.1,Bid,3,0,0,"Open Sell");...
on eurusd.#property copyright "Copyright © 2009, MetaQuotes Software Corp."#property link      "http://www.metaquotes.net"#define MAGICMA  20050610double cutlevel=10, totalprofit=0, volume=0.1;int CalculateCurrentOrders(string symbol)  {   int buys=0,sells=0;//----   for(int...
I have a couple of small commercial EAs that will add or overrides some settings in another EA on a chart. Some of them such as a 2 stage TSL that I have can select numerous different pairs to act upon when attached to just one chart. I want to make some EAs that utilize this technique, but I don't...
Patrik Polak
  Tickdata (1)
Hi, I have a file .txt with tickdata of DAX30, the datas are drawing like this. I can´t it import (in data history center(F2)) to MT4. If somebody can help me to make with this tickdata a 1 min chart that would be fine. thank you 01/03/2011,09:02:57,6973.3901/03/2011,09:02:58,6973.5401/03/2011,09...
Hi there, i am fairly new to writing EAs, so i wanted to start of small and let the EA grow over the time. At the moment i am stuck with exporting values from the ZigZag2_R_ indicator to my EA. As stated on the page of the indicator ( https://www.mql5.com/en/code/7762 ) you can read out the peaks...
Hi, I'm new to mql4 and I need some help: is possible convert pixel coordinates to time/price coordinates? I'll do code for get mouse pointer coordinate at left mouse click, now, I'll want use that pixel coordinates to "select" a bar on my chart, but bars are only selected by time or index and I...