MQL4 and MetaTrader 4 - page 315

To post a new topic, please log in or register
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?
Hello,  I would like to receive the answer from responsible person from Metaquotes. Because my broker said that this is the BUG in Metaquotes and they dont compensate my big losses.  Last and this week I have the problems, when I opened the one order, the system opened not one order, but two orders...
Hi, I am learning mql4. I made an indicator to get in a certain way the candle strength and create a bull-bear curve. Please let me have your comments and any suggestions for improvement. I have added a detailed description, as comments inside the indicator file. Thanks for testing AndPra...
  Listing news (19   1 2)
Please where is my mistake? I have a file that you downloaded in MT4 Files folder and I need to just write. Thank you    
How many character can it name of global variables? (max. enable long name)
Hi guys, I couldn't find here in the forum or documentation if is it possible to delete an object by getting his description only instead of the the name.  The application is to delete that Arrow object created by any EA when a position is opened as soon as it is created.  I tought about insert this...
Is there any method to test my ea with given input leverage? This is for testing purpose only to setup money management in live!
Hi, i'm newbie here, i have developed simple EA wchich place pending orders at specific time. the broker dont allow to have expiration time less than 1 hour so i want EA to delete these orders 5 min after placing. Here's the code, can u help me? where am i wrong?...
I have been trying to rate myself as a trader. So far,the parameters I have been looking at are: 1. ProfitsI make 2. Strategies to reduce losses and risks 3. Knowledge in business 4. Loss-handling strategies What else can we look at when trying to determine whether one is a good trader? 
What function use to copy or export file.csv to the specified folder ?
I have this custom indicator that creates an alert / push notification when CCI crosses either -100 or 100.  The problem is it keeps going off every time it bounces around the 100 mark...very annoying. I wanted to try and add a delay something like this to the attached indicator: bool AlertDelay()...
Hi I'm trying to add a time delay between alerts, to prevent fresh alerts appearing every tick when conditions are satisfied. I'm guessing this can be achieved by using an array storing the time of previous alerts, and having a specified time delay. However, my theory is a little ahead of my...
Hi All, i am creating a table on a chart that uses a "Wingdings" arrow. The simple code below produces an arrow in the label named "arrow" - I want to use OBJ_LABEL because of x,y coords and not time/price. ObjectCreate("arrow",OBJ_LABEL,0,0,0,0);ObjectSet("arrow", OBJPROP_XDISTANCE...
to do backtesting, entries are not correct because erroneous signals IWPR delivery. The same problem with other indicators The code Expert showing values ​​williams % Range: int start() { if(JumpBars==Bars || Bars<14) return (0); JumpBars=Bars; double WilliamsValue=0; WilliamsValue =...
New article MQL5 Cookbook: ОСО Orders has been published at mql5.com: Any trader's trading activity involves various mechanisms and interrelationships including relations among orders. This article suggests a solution of OCO orders processing. Standard library classes are extensively involved, as...
Hi all, Trying to make some code that uses OrderSelect() to get the ticket number of the 2nd last order  that has been opened by my EA on the current pair. (EA has a magic number). Looked around but everyone is just selecting the last order. Thanks for any input. Cheers Richard
HI, I'm a newbie at MT4. I'm wondering if price alerts work (through push notifications) when my desktop MT4 station is closed?   Cheers! 
forextime8
i am creating an one click trading the question is .... how to get number with decimal place  ? for point, no decimal place => okay    TakeProfitPoint = (int)StringToInteger(ObjectGetString(0,"ButtonEditTpPoint",OBJPROP_TEXT));   ChartRedraw();   Print("ButtonEditTpPoint : ",...
I have 9 programs available in the Market,I have written updates for 6 of them but I keep getting responses from the testers that does not make any sense. It is like they are testing my code for MT5, not MT4. Any help or direction would be very appreciated....