MQL4 and MetaTrader 4 - page 455

To post a new topic, please log in or register
I am trying to make a simple EA that can open and close limit orders at specific times. Every time I run the code I get an Error 130. The take profit and stop loss both look right. Could anyone look at the code and see if they can give me a better idea of what is causing the error? Here is a piece...
  Cant log in to MQL5 (11   1 2)
Hi, Even when I try and reset my password it says my email does not exist!!! Anyone else having problems?
hello, I want to ask if its posible to put buy stop or sell stop on indicator? What I want is to put buy or sell stop on indicator and then it reached that posision open order with price thant is that moment. I dont know if I said intelligibly what I want.
Hi, I doubt it, but can we change the order of the symbols() in the Market Watch - to open trades manually from there? Where can I find this order - what is its secret? Thanks in advance! Gooly
Hello, I'm having some issues figuring out how to get his bit of code to work. It's supposed to search the past 200 bars from the current bar, look for whether or not one of two indicators have a value, then record the high or low of the bar that the indicator has a value on (depending on if the...
Hi Weekend coder here resuming my learning on MQL4 I started the metatrader 4 and was going to review some of my old EA's and start working on them again and noticed there is no historic data to work on any EA's Says i'm connected and the chart is there but it is the weekend so there is no charts...
  highest cci ? (1)
how can i find the highest cci ? i will crosscheck highest price and highest cci. then i don't know how can i do that :S
Hi fellow MQL Programmers, I am trying to develop an EA using MYSQL to mirror a trade from one broker to another broker and having the success of doing it (Opening trades), but when it comes to closing trades especially when trying to close trades with the same volume (client to the mirror) i am...
How i am show on comment show special text like : copyright (c) How to write on comment this special test : "(c)"
When I open 1M EURUSD graph on MT4 it uses more then 500MB of RAM. 2 other 1M graphs use only 80MB. Where can be the problem and how can i fix it or why is this happening? Is it problem on brokers side or platform? Thx
Hi all, im new on this forum, and havent metalanguage experience....( i have used metastock and tradestation until now). i found volume analisys very important.....for me its like fuel for a car ;) .... i have written a code in excel who make volume count tick by tick and would like if anyone would...
Hi How do you make datetime past = TimeCurrent(); minus 15 minutes?
Hi, my first post here. I'm very new to trading although i've been in the gambling industry for a long time. I've just started coding with MQL4 and have been testing myself by writing basic functions, etc. I have this code and can't get it to take any trades in strategy tester? Hoping someone is...
The MetaQuotes MT4 setup executable was downloaded and upgraded it to the current beta Build 584. It was indicated by MQ there were would be 21 timeframes available in the new release however all that is visible in this build is the standard 9 timeframes. How do you activate/expose/add the...
Hi Guys, I want to take an historical price[X] then divide that with the price one day prior to that historical price[X-1] Then multiply factor that with another set price. So: Xfactor= historical price [X] / historical price [X-1] Price = Xfactor * set price. Then I want to project that price on...
I am trying to write a EA that stops for a few seconds after the close of every bar. Here is the code, it pauses after the bar close but does not play sound, any help appreciated. Thanks _______________________________________________ extern int secsToPause = 5;int last_time = -1;int init()  {...
I need clarification on the sleep() function. First, suppose I set the sleep function for 10 seconds or Sleep(10000). Does this mean that the ea is suspended for 10 seconds regardless of how many ticks come in on the chart or is the sleep function dependent on ticks coming in to keep a "clock"...
string cfgFilename = "myfile.cfg"; string page = "";   int h = FileOpen(cfgFilename, FILE_READ|FILE_BIN);   if(h < 1)   {         Alert("[ERROR] "+Symbol()+" Cannot read file: "+cfgFilename);         return (false);   }   else      {         int len = FileReadInteger(h, LONG_VALUE);...
Hi, I did a bit of research this weekend on variations on constant range bars. Google it if you don't know what it is. There's a nice script from MQLservice to do this. It's a commercial script so I can't post it but there's a number of variations non-constant range bars; mostly for Ninjascript...
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...