MQL4 and MetaTrader 4 - page 546

To post a new topic, please log in or register
Hi, i as wondering if there is a way to have an EA start at a certain time of day usig the terminals internal time or the computers time. Please advise if you are aware of any build in function or snippet of code. Cheers ergys
Hi all, I need some information: If I have one metatrader client terminal e 2 chart (Eurusd and UsdChf)is it possibile attach the same EA on 2 chart?One tick arrives on first chart (Eurusd) and, after a few milliseconds, a tick arrives on the second chart (UsdChf). If the tick on second chart...
Hi How can I check orders that have executed and closed with a loss? I use pending stop orders to enter trades. I want to check closed orders and if they were losers and price is now below my entry price (long eg) I want to place the same pending stop order and give it another go. I would like the...
I am running an EA now for some time and I found out that it sometimes just looks like to freeze. In the picture below I coded that the open order should be exited at the top BB. And this goes good in 90% of the situations. But sometimes not, and the order is closed just after a new compilation of...
Hi, can anyone tell me how to do this EM_VOL to work from 1000$ whith same settings as it is, or maby anyone can saky better setting. thanks for hellp. here is EM_VOL EA: https://www.mql5.com/en/code/10778
Hi, I probe this code. .........while(j<10 && (iClose(CurrentSymbol,ServerSyncTimeFrame,2)==0 || GetLastError()==4066)) // call the iClose() function with a shift of 2 to ensure we sample the timeseries in a likely unsynchronized span { j++; // increment the while loop...
How can I get info that the market is closed? IsTradeAllowed( ) is return true in time (weekend)
Hello, I have "alerter4u" indicator for metatrader4. But i need it to do a couple of other tricks so to speak. At the moment it will alert me to any line, trendline,rectangle or anything else i put on my chart. It does this via a popup box. So, very handy! I need to lose the popup box and i want to...
Hi Again Just wondering why all the MT4 has a copy file are stored here? AppData\Roaming\MetaQuotes\Terminal\AE2BBC7E65893356A60248680B4C\MQL4\Experts Because when open a file in MT4 for modifying in the compiler, and click save as it wants to save it in the directory above Not in this one where i...
I think, anyone can trade foreign currency. It does not matter if you are professional or not. And the factors such as the race, religion, nationality and the likes are not big issues as long as you want to do Forex trading and you have the funds to open and sign up a trading account with broker of...
I manage and hold all my time so the decision on how long I will trade per day depends on me actually. Sometimes, I spend my time in Forex trading for 4-6 hours. There are cases that I do it for more than two hours only. It actually depends on how I like to do it and how I am feeling to do it. How...
Hi guys, can you help me, please? I don´t know how update this code: https://www.mql5.com/en/code/10428 I need read longer body message than can it this code. Unfortunately I cann´t repair code. Thank you. Endy
  Do You Like This picture? (34   1 2 3 4)
I have gathered several indicators and develop this picture, which serves the activetraders. If you can develop an Expert he would be grateful.
  Need Help with code (18   1 2)
Hi All, I cannot understand why this code not open any order and also it doesn't give any error. Update - I Added the code down on this topic. Thanks A lot.
Hello! I need help with my expert advisor. I want to detect wether previos trade was stoped out by stop loss and what was the opening type (BUY or SELL) of previous order. I need this becaus i don't want to open new trade immidiatly after previous trade was stoped by sl. thanx
Hi all, Having an issue closing orders . Here is the code for filtering: if((Hour()>=0 && Hour()<=4 || Hour()>=8  && Hour()<=24))return(false); This is working fine, new trades are not opening. The issue is getting out of the trade. Ie. trade is placed at 7:45am gmt and exit is...
Hello, I've decided to play around with the alligator indicator after having a look at it over the past week or so. I slotted in the parameters for this indicator into a pre-existing EA from Meta-Quotes (which, unmodified, works). The EA opens SELL positions, modifies them appropriately and closes...
Hi Everyone, I'll apologise first if this is a noobie/already asked question (I've spent all afternoon searching) and as you can see this is my very first post. I'm trying to find an EA that will continuously monitor a chart. If it detects an open trade it will wait until a certain amount of profit...
Hi, I have a quick question. What do the 2 vertical lines mean in metaeditor. Are they just like the "&&: symbol. For example: if((s1[i] < Low[i] && s2[i] < Low[i] && s3[i] < Low[i] && s4[i + 1] > High[i + 1] && s4[i] < Low[i]) || (s1[i] < Low[i] && s2[i] < Low[i] && s3[i + 1] > High[i + 1] &&...
  orderopentime (7)
//+------------------------------------------------------------------+ //| RPoint. mq4 | //| Copyright © 2004, Poul_Trade_Forum | //| Aborigen | //| http://forex.kbpauk.ru/ | //+------------------------------------------------------------------+ #property copyright "Poul Trade Forum"...
I've been doing some research online about how to back-test properly and I have a few questions: I found some sources that explain how to backtest with tick data, without explaining the need for that very much. Is this really necessary for all strategies? There are other options for the modelling...
The crosshair I have noticed is often out by 2 or 3 pips. Is there a work around this? Ta
Hi All, I would like to get some advice on an issue I'm currently having with coding the logic for my EA. The EA is is to open a position based on a specified signal which it does. It is also to exit said position based on one of two exit signals. The problem is with a third exit signal. This third...
  Running 100 MT4 Terminals (23   1 2 3)
Hi there, I am currently working on a project that will require me to run 100 MT4 terminals simultaneously. Can someone tell me what are the hardward & operating system required to run 100 MT4 terminal simultaneously? Is it better with Linux or Windows. Can I do this on a QUAD PC or Dell Server?...
Hello forum, hope you might help with this quick question I have tried to create from scratch a simple indicator that draws a channel for the high or low values of a specified period of bars. Yes I know there are versions of this available, but trying to learn to do myself. Seems to work well in...
I want to close a position entirely. It does not matter what its lot size, slippage or whether it is long or short. What parameters should I put in? Would 0 work? OrderClose(OrderTicket(),0,0,0,Violet);
  counting bars (6)
Hey, I want to count the number of bars it has been since the last MA crossover. Example chart below, which would have the answer of12 bars including the current bar. I think I need to use a for or while loop of some sort but I never really understood them when I went through an online JS course....
Dears i`v created an expert advisor with (Etasoft forex generator v 4): That expert is multiply the lot size if the last trade has been reached the TP so the steps are : 1 - open market orders (buy & sell) at the same time with inital lot size 0.01 no SP and 3 pips TP 2 - if the price goes up for 6...
I'm new to this and the terminology is not what im used to i.e.(pips, higher highs, higher lows, etc.) is there a better library out there that can speak in layman's terms like if you want to open a order 30 pips above the sma it would be 30 * pips > 60 sma.
Hi everybody, I'm testing the new build 579 and it's MQL4.5 language I've a problem with input parameter names. Here's the mql5 guide: https://www.mql5.com/en/docs/basis/variables/inputvariables I've write this Test indicator, with #property strict command and everything is working properly,...