Download MetaTrader 5

MQL4 and MetaTrader 4 - page 326

To post a new topic, please log in or register
I have problem with saving profiles. MT4 doesn't remember chart order. I.e. I have 10 charts. EURUSD is placed as the last one and I move it on the beginning (first chart/tab). I save profile but after restarting MT4, chart order isn't remembered and EURUSD is still on the last tab. I used this way...
I'm not sure if this is already documented, but I thought I'd share my findings from experimenting with iCustom and OnTimer. Basically, it doesn't work. Consider the following simple code: double TestBuffer[];double TestValue = 1;int OnInit() {   IndicatorBuffers(1);   SetIndexBuffer(0...
Hi!   That's my first post, so let me welcome everyone.   I have found few topics about my issue, but nothing helped so far. While working on my ea, I would like to get Highest price of last 4 bars. That's my code:   if(Hour()==10) { int bar=iBarShift(Symbol(),PERIOD_H1,TimeCurrent());...
For example I have a leveraged account with $10,000 balance. I open a position of 1 Lot requiring margin of $1000. Free Margin is now $9000. Market moves against me and my trade is losing $9000, I get a margin call and the trade is automatically closed. My question: In the above scenario does the...
I need to get iCustom to work to import some values from an indicator. This should not be difficult. I used the syntax straight from MQL4 documentaion: Var_1 = iCustom (NULL, 0, "Indi_1", 2, 0); I ensured that all my variables were correct; same pair, current time, indi name copied directly from the...
Does anyone have a consistent experience trading moving average crossovers? I read numerous articles on this but have yet to come across a trader who would share experiences and lessons learnt from them.
Hi, I'm new to this forum, so excuse me if this post is inappropriate. If this post would be more appropriate on another thread, forum or website, then feel free to let me know. Basically, I'm considering getting into automated trading and I'm reasonablly satisfied with the MetaTrader front-end....
When detaching the indicator from a chart, following error message shows up in the experts tab. It is probably due to the object holding the buffer gets destroyed in the deinit(). Any idea how to suppress the error message display? 08:20:34 P35-indicator GOLD,M10: uninit reason 108:20:34 Indicator...
Hello all,  Hopefully this is the right place to ask this kind of question, it seems to be totally about developing stuff here, but since this is MT4 forms so I guess this topic might be in the right place, hopefully!  I'm trying to decide which broker should I go with, choosing between the famous...
How to choose or apply ? Thank you
They say the best way to learn is by making mistakes - so I must be learning a lot right now.   I know the coding may not be neat but it is a start for me.  I am trying to learn two things.     1) How to only place one order per bar. 2) How to close an order after a set number of bars have passed....
Hello, I am a php programmer and new to mql4. I am making an ea that uses alert of an indicator to open trade. Check below code of indicator that prompts alert.... PlaySound("alert.wav"); if (gi_112 == 1) MessageBox("Entry point: buy at " + l_price_20 + "!!", "Entry Point", 0);       else if (gi_112...
Hi i try test a EA in 1 1 2014 to 7 1 2014 and ea work like a charm without any loos trade. BUT when i try test from 1 1 2013 to 12 1 2013 result fully difference and result very bad Something that has surprised me is big difference in result test in that two period  What I would like to ask why in...
Can anybody suggest why the following function would randomly delete TakeProfit levels when modifying the TrailingStop. TakeProfit, TrailingStop and TrailingStep are all controlled by this function. This function also controls these levels for two different strategies running within the EA. Both...
I'd be very grateful for a little help.  I'm trying to extract the hours:minutes close time of the previous bar. Looking at the help here https://docs.mql4.com/convert/timetostring, I think I need something like this:  HrsMinsTime TimeToString(       datetime LastMarketCloseTime,       int...
Hi all, Just starting out here and wondered if anyone can help. Complete newbie question: Do I have to already have opened a brokerage account in order to use the MT4 charts?  I can't just download the software package and use the charts for my own practice?   Many thanks! 
after three letters typing a function name it drops the menu down and if you hit enter it pops the word into line, but not the parenthesis. Is there a way to get the ( ) to auto-fill along with the function name when you do this? I think over time it would be worth it, or am I being lazy?
Hello Forum, usually I use the following code to avoid the execution of my EA on every tick because I calculate with closed bars: void OnTick() { static datetime Time0;   if (Time0 == Time[0]) return;   Time0 = Time[0]; But now I want the EA to be executed once an hour. Is this code correct? void...
Dear,  I'm currently backtesting my grid ea, it open multiple pending order set to expire within 3 hour. Unfortunately it makes so many little line that make my chart too noisy and hard to read. Any thought how to delete it without deleting the line that created by market order would be very much...
Just that question.  Am adding 4/5 digit broker detection to an ea I wrote on a 5 digit broker.  On the 5 digit broker I might send an order with a take profit or a stop loss of say 125 points which would be translated to 12.5 points for the 4 digit broker.  So adding that to the four digit price...
//+------------------------------------------------------------------+//|                                        Modify SL_Profit Lock.mq4 |//|                                        MetaQuotes Software Corp. |//|                                        http://www.metaquotes.net...
Will MT4 Platform be able to run on the Winows 8 Pro Tablet
Good Morning, I'm testing an indicator with an EA (using iCustom). There's only one buffer. Basically the indicator will cross back and forth across a zero value. If the indicator is positive, I'll buy. If it's negative, I'll sell. My trouble is that when I run the EA and indicator in visual mode...
  HELP WITH CODE (15   1 2)
Hello everybody, It took time to me to learn good old mql4, then stayed some time away from it, and now that i come back i find it all changed. Far from discouraging, I am trying to use this changes to learn a little bit more than what i used to know.. Thus, i before only programmed few indicators...
I'm using QuickChannel from FX Blue (formerly mt4i.com) to share messages betweenexperts in two different brokers.  Itworks fine; all messages sent from robot 1 are received by robot2 and viceversa. As you can see below, logic is implemented onOnTick() function. My purpose is to read new quotes on...
Is anyone aware of the codes for the Symbols. ie some of the timeframe codes are   PERIOD_H4       33136 PERIOD_M1       33137 PERIOD_M5       33138
New interview Johnpaul77 Signal Providers: "Our Strategy Remains Profitable for More Than Three Years Now. So Why Would We Change It?" has been published: Let us reveal a little secret: MQL5.com website visitors spend most of their time on Johnpaul77 signal's page. It is a leader of our rating...
Dear all,   I really hope someone can help me with that problem, I’vebeen trying to find a solution for this in the internet but I’m sure I’m notgetting something. Thank you for any help! I am trying to build a DLL to which I can send rates fromMetaTrader, then modify this array and return the...
Elie Azar
Hi If anyone knows how to use the current mt4 platform with all the charts and indicators to trade an mt4 account from another broker let me kow please. The only way I know is to try and use a trade copier of some sort.    Thanks 
Please review this screenshoot and consider this as bug report.   tx