Download MetaTrader 5

MQL4 and MetaTrader 4 - page 77

To post a new topic, please log in or register
Today I restarted my Laptop after about a month ago. Now I get an error on starting MT4: "Fehler beim Erzeugen eines leeren Dokuments". (in english: failed to create empty document). I got Windows 7 x64. MetaTrader worked perfectly till today. After the Failure, MetaTrader is open, except the Chart...
Is there a function for this dashed line between opening and closing arrow of one trade?
Hello I want to know how to calculate the initial negative profit immediately after opening a position. Is it just a function of spread and lotsize? Or there are something else that must be considered//?  Please tell me the formula for calculating this.   thanks 
How to calculate the minute elapsed since opening a position Can this be true: if(TimeMinute(TimeCurrent())-TimeMinute(opentime)>60) { .... }    
Hello,   I was wondering if anyone had any example code for opening trades during certain days.  I'd like to only open trades Sunday (when market opens) until Thursday.  If the trades are profitable by Friday, I'd like to close them out.  I'd like to do this to eliminate gap risk over the weekends....
Hi, I'm hoping someone can me please? I have been writing in mql4 a dashboard for my trading strategy, I have about 20 pairs open as well, and the dashboard provides a central place to report various information. I have coded a button (I'm using rectangle label) and passing the chart ID by a click...
Hi there, I was wondering if there is any way to view the stop loss amount in a new order by currency instead of by pips? It is now often totally unclear to me how much I will lose or win when setting a new order. Is there a setting for this? Or a tool? Thanks in advance, Johan
Hi,  I´m assuming this question came a lot but I couldnt find anythin helpful.. Currently My ea works like: if(OrdersTotal()==0){ placing order ... etc .. }  The problem with the code above is, that it stops trading as soon as one order is open regardless of the conditions to open a new order. So...
Hi Everyone, Backtesting an EA and have noticed some incredibly strange profit results: Long trade is trailed out 4 pips above the entry price but results in a $67 loss Commission charge is only .7 pips, so should still be a 3.3 pip profit. Account is in USD and lot size .21 = $2.10 / pip. Any...
Hi guys, I am developing an EA and one of the exit strategies is when the RSI flats out. For example: http://d.stockcharts.com/school/data/media/chart_school/technical_indicators_and_overlays/relative_strength_in/rsi-2-rsplot.png Look at between 3 and 5. The peak becomes flat. In these moments, I...
  mediate the price (13   1 2)
Hello everyone,I explain this problem now ... how should I do to open a position, in the same direction of the first position, only after another loses for example 100 pips?I do not take the stoploss, I just need to open a position that you will close to target or if it goes back again to 100 pips I...
Prompted by the new article at https://www.mql5.com/en/forum/127024, the attached files are an example of sending messages asynchronously between different instances of MT4 on the same computer, using named pipes. Inspired by the MT5 article, but there are some major differences in the methodologies...
G'day everyone,  I was wondering if it is possible to get a notification of a trade occurring via my Apple Watch?  Thanks in advance for any answers. 
I'm new to MT4. When I save a profile, such as EURUSD with three different time charts, then open another profile such as AUDUSD with three different time charts, I now have all 6 on my display. It seems to me that I should be able to change profiles and not pile up charts into one view.  What am I...
Hi, Is it correct that live the time of MqlTick does not show fractals - the last one from Friday doesn't show any? Fractals would mean that each new tick would have a different timestamp (fractal) than the previous one, while otherwise several ticks within the same second would have the same...
does higher time frame has more control points than lower time frame in optimization?
I have a live account with tradersway.com and I want to open and use two MT4 accounts at the same time with different account numbers on the monitor.  Please let me know how I can do this.  
Hi I'm new in Mql4. I'm trying to create an ea based on the choppy market indicator. I've identified the buffers as follows:    double cma=iCustom(NULL, 0, "CMI",60,10,false,3, 1);//smoothed ma    double cmil = iCustom(NULL,0, "CMI", 60,10, false,0,1); //cmi line    double cmilg=iCustom(NULL,0,...
Hi guys, I'm trying to place a short order via OrderSend but I get error #130. Since I'm a noob in MQL development I'm sure you can solve this issue really fast. :P So here's the code snippet: double takeProfitTotal = NormalizeDouble(Ask-(TakeProfit*Point),Digits); double stopLossTotal =...
Is there any way to execute a code on an external event instead of executing thre code on every tick? For example when a .txt file in MQL/Files folder gets refreshed.   The idea is to send information/quotes to MT4 by an external (e.g. Java coded) program. This (Java coded) program creates/refreshes...
i have  subscribe in signal Small to big money please how i can changing lot size to 0.02 or 0,03 thank you very match 
Hello, Can anyone please add a stop loss based on pips for this script. This script launches multiple orders simultaneously Set manually s stop loss of 40-50 pips when we execute this indicator. Able to set a stop loss for EUR/USD order 40 pips Able to set a stop loss for EUR/GBP order 50 pips Able...
Hi guys  I wish to have the MT4 to have the prices update when the market is closed (weekend) so I can test EAs immediately while I am coding them without backtest. The data prices obviously are random or past data. Does anyone know of  way to do that  or a plugin that allows that?    Thank you
Hi,  I am new to MQL4, I haven't had a problem coding lotsizes based on a fixed amount of pips but cannot seem to make it work where I am calculating the lots size base on entry and stoploss levels. Please advise... Code is below...  void EnterTrade(int TypeOfTrade){    err=0;    double Equity =...
Peter Williams
  Invalid stops error 130 (17   1 2)
I have been using XM brokers and appear to get Invalid Stops occurring more often tyhan elsewhere but in any event don't quite understand what factors can lead to this error  I read the following with WHRoeder's comments - interesting but don't don't think they apply to my circumstances  https://www...
Strange Discovery; I need Help! I discover today as I was trading using my hedging strategy that I could not place a pending order within my recovery gap again as the platform kept on saying invalid SL/TP. I sense there was a little volatility in the market then but even for like 1hrs after then,...
hi, i am writing a custom indicator, i need it to sum the closing price based on specific time for x times  for example, sum all the closing price happened at 1100 pm only for last 10 days on a hourly chart(because it may miscalculate on other time frame) assume today is jan 30, the indicator will...
Perhaps a large portion of the negative aspects of the NFA hedge and FIFO rules could be mitigated with Back Office record keeping. (or somewhat mitigated with a good dashboard and a reliable VPS. There would not need to be any creative bookkeeping just strict protocols for interpreting orders. If...
Hi guys. I am trying to write an EA which will auto download a file from the internet, then read data from that file and then execute trade using those data. but i encounter problem with downloading file. the file i download got a bigger size compare to the one on the server. If I run this code on...
Another proof why an EA has most of times completely different results on live. Imagine that bug on a live account with real money, easy way to lose your money thinking that it is because a bad robot. No always! Sometimes may be because of a platform bug. On tester, orders 3 & 4 close with pips gain...