MQL4 and MetaTrader 4 - page 1478

Hi, I'm new to programming MQL4, or even programming at all; I've been working on the trailing stop part of the EA. I use a regular very basic SMA cross to generate the BUY and SELL signals and it is irrelevant at this time. The issue is : I'm satisfied with the trailing of BUY trades, but somehow...
[Deleted]
Hi guys I have been using all your great suggestions to make this Grid EA idea I had, work properly...for the most part it works in how it places the grid and replaces triggered orders but I am having a small problem... I want to make sure that if an order closes in loss then the EA will cycle...
[Deleted]
Sleep(5000000); //Does not Work with the Backtester! TimeKeeper[0] = TimeCurrent(); for(int t = 1; time >= 3; t++){ t++; TimeKeeper[1] = TimeCurrent(); m = TimeKeeper[1] - TimeKeeper[0]; if(m > 1500){ break; } t--;t--; } //This example does not either! // How can I include a Time Delay that can be...
[Deleted]
  Is it possible??  (8)
Is it even possible to write an Expert Adviser that dose this? EUR/USD TF – 30m Short - after the 20th bar closes lower than the close ofthe previous day if the 20th bar is 35 pips below the close of previousday. Long - after the 20th bar closes higher than the close ofthe previous day if the 20th...
[Deleted]
I'm trying to learn about indicators. The code for this one is below, but here is what I'm trying to figure out. I understand where the first part of the text the indicator is reporting is...it is this code: <IndicatorShortName("sMACD(" + FastEMA + "," + SlowEMA + "," + SignalSMA + ")");> I have...
So I code a new custom indicator that plots the same indicator on different timeframes in 1 single seperate window. No big deal, right. But then I start to think about it and there is something wrong (either with my code or with the function, probably with my code): The deal  is: if you calculate an...
Hi, first post, I'm new, etc. I am developing an artificial neural network , and I need lots of data to train it... How can I save the data feed from MT4? I just need it for one symbol at the moment. Also, any way of getting historical data would also be helpful. Any suggestions
[Deleted]
I'm having some problems getting my EA to wait a specific period of time between trades. I know I'm supposed to use the two variables listed above but i can't get it to work properly (especially in back tests). I know I'm not referencing previously closed orders correctly. If anyone can help me...
[Deleted]
Hello, I am a newbie to this forum so apologies in case this have been solved already (I have tried to search before asking but haven't found an aswer I am happy with). I am trying to see how to best code an algo that will look at different time frames (TF). For instance, you may enter with a signal...
Hi. I want to know a thing about timeframe. As you can see on the table https://docs.mql4.com/constants/timeframes PERIOD_M111 minute.PERIOD_M555 minutes.PERIOD_M151515 minutes.PERIOD_M303030 minutes.PERIOD_H1601 hour.PERIOD_H42404 hour.PERIOD_D11440Daily.PERIOD_W110080Weekly.PERIOD_MN143200Monthly...
[Deleted]
What the hell? I've spent over a year perfecting my hedging strategy - now, they want me to trade naked, uni-directional positions? Does anyone know of a broker that will continue to provide in-account, in-currency offsetting positions?
Ok so I have found an indicator that I really like and have done well with. Im trying to make it into an EA but am having trouble. Very basic. It is an double EMA cross, so you would think that it would be easy to code. The code that I have taken from other EAs and put together isnt making every...
[Deleted]
Hi guys, I've created a simple EA. It works if being used on 1 pair. However, when I applied the EA on another pair as well, it doesn't works simultaneosly. Meaning to say that, when for example, the EA opened a trade on EURUSD, it won't run on GBPUSD . However, when the trade closes, it will open
Hi, I’m watching the NormalizeDouble function. I know that the function, with 2 digits, works as follow: 0.017 is rounded to 0.02. Is there the possibility to round the number to the lowest level? If the number is 0.017 I’d like to round to 0.01. Thank you!
[Deleted]
I want to filter orders on an ea with whether macd is up or down. I have tried the below. How do I fix it? double Macdcurrent; Macdcurrent=iMACD(NULL,0,12,50,9,PRICE_CLOSE,MODE_MAIN,0); if (Macdcurrent<0){ if (!ExistPositions()){//2 if (PS){//3 OpenSell(); return(0); }//2 } Thanks for any help
[Deleted]
is there somewhere a free library of scripts? for instance a script to go over all currency pairs and find those touching RSI limits?
[Deleted]
Hi: I just installed Meta Trader on one of my systems and found that MetaEditor hangs while trying to compile a very simple MQ4 file. The system is a Windows Vista 64 system with an Intel Core2 Quad CPU. The system has 8GB of RAM. Other (non metatrader) tools work just fine. The process just seems...
[Deleted]
Hi Folks: Is it possible to compile ex4 files without going into the MetaEditor GUI? I typically use a different editor (emacs) for ex4 code development but I can't compile it without running the MetaEditor GUI. This is a lot of overhead for a simple compile step so I was wondering whether there was...
Hi, I was backtesting mi EA on MT4, results were pretty good. Yesterday evening I dowloaded data from the history center...now results (with SAME SETTINGS and on the SAME PERIODS) of backtesting are completely different!!! Four main questions: 1 - How can this be possible? 2 - someone of you had the...
[Deleted]
I would greatly appreciate any help anybody could give me on my EA. I am having a problem with the SendMail function, I receive the e-mail but for order open price I receive 0.0000. The other problem I am having is the OrderClose function is not closing the order. I've tried several solutions with...
[Deleted]
I try to run mt4 but it display pop up: "An internal exception occured (Address:0x81fc09) Please, contact support@oreans.com. Thank You!" i looked at task manager and find no problem... is it comes from metatrader 4 itself ? Anybody had the same experience ?
[Deleted]
I placed ATR on my chart with 18 periods. Then I drug Moving Average onto this indicator window, set it to 2 periods, and then told it to apply it to "Previous Indicator's Data". I want to use the gap between these 2 lines in EA logic, but I cannot figure out how to code the 2-bar MA of ATR in the...
Okay, I have made a lot of functions in my ea. I cannot simply remember all my functions with their specific parameters, constants, and et cetera... You know how metaeditor gives quick hints on internal functions. I want metaeditor to remind me of my own functions with their parameters. How do I do...
[Deleted]
Please help me to design a custom indicator or point to one like this, that shows when 1)the current bar high is greater than the previous bar high and the current bar close is higher than the previous bar close and 2)the current bar low is lower than the previous bar low and the current bar close...
To the Meta Quotes Programmers: I dont know what the hell is going on with you guys, but build 223 has a major glitch with the strategy back tester. I down load the data from the history folder, and then notice that there is 13 days of missing data April 3 - 13/2009. Then If refresh the chart, I...
[Deleted]
Hi, I need to make a code to convert candles into a wave pattern, the input will be the candles, and output would be the lines joining short term tops & bottoms, just like in this picture http://i430.photobucket.com/albums/qq30/kernu11/waves.png What method should i use ? Names, links, ideas,...
What are the best ways to get free: - IFR Forex Watch - Thomson Reuters streaming news - Dow Jones Newswires FX Select
Hi, today I started MT4 (223) the first time on my new notebook with Windows 7 beta 64 Bit. At first MT4 shows me the (custom) indicators and experts from the folder: C:\Users\cas\AppData\Local\VirtualStore\Program Files (x86)\MetaTrader 4\experts\indicators But then I couldn't get a login to get...
[Deleted]
I've setup stop losses based on FibRetracement. Once the price goes below the Fib100 line this new SL should be set: OrderModify(ticket,OrderOpenPrice(),Ask+MyPoint*FibRetracement(2),OrderTakeProfit(),0,Red); The problem is that the SL was set ABOVE the Bid which is wrong. Any ideas?
  My EA's Trades  (1)
Uses 55 Moving Average and RSI . Login : 753329 Password : 4dcgwxy Server : AlpariUK-Demo When : Sunday 11.00pm (GMT) to Thursday 11:59pm (GMT) Symbols : EURUSD, USDJPY, GBPUSD, USDCHF Timeframe : 1M mark.johnson.uk@o2.co.uk