Download MetaTrader 5

MQL4 and MetaTrader 4 - page 282

To post a new topic, please log in or register
Hello fellow Traders. In a recent programming attempt I wanted to try out manual Take Profits and Stop Losses. I'd like you to tell me if I'm grasping this concept right or is there a change that is due. Note: In Take Profit I include the Spread which I have to in order to compensate for the Broker,...
Hi everyone, I have been giving myself a headache over this for several days and I really need some guidance. The code in question is a custom indicator that draws 4 lines on a chart. Two for high/low price of the last x number of bars, and two for stops placed a multiple of the ATR below the...
Hello fellow Traders, would this be the correct way to calculate spread? double BidPN; //Bid Price Newdouble AskPN; //Ask Price Newdouble SpreadC;void OnTick()   {      BidPN = Bid;      AskPN = Ask;      SpreadC = MathAbs(AskPN - BidPN);   }
Hi all, Having a bit of trouble with the OOP implementation - I will say this first, I am a noob when it comes to OOP. I want to define the following array as a global constant: private:    static const double FibonacciLevels[6] = {0.0,23.6,38.2,50.0,61.8,100.0}; Clearly, these values are immutable...
Hello, I would like to create a PROFILE where I will always find the chart windows (the tags) in the same sequence. Example, from left to right: the tags would be AUDUSD, EURUSD, USDJPY, GBPUSD, and I want to keep this sequence as it is. The same idea if one would like to organize them...
  StrToTime (5)
Dear Metaquote Users, My codes are below: string ExpiredDate1 = GetExpireDateFromServer(tanggal, Your_Id);    PrintFormat("FROM SERVER : %s", ExpiredDate1); ....PrintFormat("AFTER SPLIT : %s", ExpiredDate); StringReplace(ExpiredDate,"-",".");     PrintFormat("AFTER REPLACE : %s", ExpiredDate);...
This is a new problem I havn't had before. I havn't been active trading on the MT4 platform in sometime. Just been testing and doing some coding on the Demo. Now I can no longer go to the code base and download or even look at EAs or Indicators. I just Registered tonight on Metaquotes website. That...
As I think understand it, when you are in a trade in a pair, neither of which are your deposit currency you have effectively gone short your deposit currency. You are exposed to 'cross currency risk' that your deposit currency will change relative to one or both of the currencies that your trade is...
Hello, I have developed a EA System that makes good profit in sideway market. Attach is a backtest with my EA from last week trading EURUSD 5 min Chart, it has make more then 30.000 Pips with 0.1 Lot. If the market move to a trend the risk become bigger to loose, but I think it is also a good...
Hello,  I need to build an EA which will be running on one account and will obtain information from the second account like Equity level, Balance, Open trades, etc...  Any idea?  Thanks David 
APeng
Hi guys I got a simple question: How to calculate your average return? Given is ratio of successful trades (ratio):        60% risk per trade (risk):                             5% risk / reward ratio (R):                          2 My try:            ratio x risk  x R –(1-ratio) x risk...
I'm trying to classify trends with Zigzag indicator. But my code just classifies the market as a trend (UP/DOWN). But I did some research about zigzag here in the forum and found code similar with the below one. But I applied this code to EURUSD-5min from Jan,1,2015 - Jan,31,2015 - and it just...
Hi, I was wondering if anyone can advise me on what is going on.  I use MT4 to send PUSH notifications to my android phone. When the phone receives a notification it displays in the notification area, but when I then click on it to see the whole message inside the MT4 app, there's no message there!...
Hi All, has anybody a working experience of running Metatrader 4 on an embedded computer?    Mac 
ObjectDescription takes one input-the name of an object. What if I have multiple objects, each on different charts, with the same name? How do I distinguish them?
I’m usingMT4 build 675. I made an EA which opens  a market BUY and market SELL at the same time.Both trades have the same lot size. The BUYenters at 1.18436 and exits 1.18236 (20 pips loss). The SELL enters at 1.18431and exits at 1.18231 (20 pips profit). Spead is 0.5 pips. Now thestrategy tester...
I am looking for a functionality of Detaching/ Undocking the chart from metatrader terminal, so that the detached chart can be dragged to another monitor ( this is a multi monitor workstati I searched but couldn't find any script of fix for the issue. Can anybody guide on how to undock/ detach...
I've written my own EA over past few months and am now wanting to know if there was a quick way to determine whether or not their will be a conflict when applying this to multiple pairs?   I know this may sound like a daft question as demoing it first will highlight discrepancies and conflicting...
In order to calculate the total profit/loss of an open position, which one of the following equations is correct? double pl = OrderProfit()+OrderCommission()+OrderSwap(); or double pl = OrderProfit()-OrderCommission()+OrderSwap();
I have a problem in the terminology used my MQL4 book and documentation. What does "to close an opened order" mean? I understand what is "to close an open position", but not an order. As far as I know, one can have a pending order to either open, close or modify a position. When the order is...
Hello, do you have a plugin that allows me to quickly open a position? (Metratrader 4) Choose: Long or Short. Choose how many lots.  Choose how many pips take profit and stop loss to be below and above the current entry price.  Thank you 
Hello, I'm new to mql4 so I have some confusion. I want to get the total profit of all orders closed in my last trade ( i have a hedge trade). I know that you can get the profit from OrderProfit but how can you select the trade to get its info if the order is already closed? Please help...
I was curious as to how I would set up a signal line on the MACD chart? I have not been able to find it.
I am trying to trade from an automatically updating CSV file. The file is updated with the newer entries being appended to the bottom of the file about every 15 minutes interval. The resulting file is a record of several rows of data by date/time and value as shown below.  // filename: EURUSDxx.CSV...
This is what comes up when I go there: Ошибка сервера 403 - запрещено. Доступ запрещен. Предоставленные учетные данные не дают права на просмотр этого каталога или страницы.
Hi, somebody knows why the first time of the day I run a script asking for iHigh[1] with in a loop, system returns me what is the iHigh[2] (third bar starting from end) , and when I re-run the script the same day it returns me the real iHigh[1] (second bar starting from end, in fact yesterday's...
Is it possible to move an EA from one computer to another computer using the same MT4 version and inputting the magic numbers so that the EA continues to execute the open orders according to the EA?  I want to transfer my EA's to another computer but do not want to close out my existing positions or...
After downloading an EA off the Code Base 2 Days ago, I am No longer able to get access to the MQL4 Code base. The EA downloaded and installed on a chart OK. My MetaTrader Demo is currently operating Ok. I got a message pop-up from that New EA that said, your Demo acct. has expired. Call us or buy a...
Hi, I would like to ask you, whether is Windows XP platform still supported? I have a machine with clean Windows XP SP3 installation and I'm not able to install MetaTrader 4 software. When I run the installation, I get the message with missing library.     Could you help me? How can I install the...
If I have an EA that enters trades on a specific magic number, say 1000, then can I have multiple orders with the same magic number? Even if they are different order types? (buy limit, sell stop, etc) and even if its different symbols?