input int media1; input int media2; input int hora; bool st=false; string mns="-----"; void OnTick(){ Comment ("Message:",mss); if (Hour()==hora){ st=true; mss="AUTORIZADO!" } if (st==true){ if (iMA(NULL,0,media1,0,MODE_EMA,PRICE_CLOSE,0)) < (iMA(NULL,0,media2,0,MODE_EMA,PRICE_CLOSE,0)){
Hi guys, I have backtested a strategy based of the 1 minute chart using Open Price Only Modelling. I have then backtested the strategy using every tick mode. To get the every tick mode to match the open price only modelling I added the following code(found in another thread): static datetime
Hi all, I'm trying to recall a Global Variable from an expert in this way string HOUR_ = StringConcatenate ( "HOUR_" , Symbol ()); GlobalVariableSet (HOUR_,HOUR()); GlobalVariableGet ( StringConcatenate ( "HOUR_" , "EURJPY" )) If I apply the expert (with GlobalGet only) on a EURJPY chart the code
Hi fellows, I'm currently experiencing an issue for 2 days with an EA that use MBFX system and candles to trade. I don't have a high level on programing with mql4, so I took "OpenTiks" from the CodeBase as base for my EA. Perhaps i missed some codes that were in the original EA and that could
if RSI over 70 if Close[0]>Open[1] Sell ---- Close if RSI = 50 if RSI below 30 if Close[0]<Open[1] Buy Close if RSI = 50 I tried to code it but not work .someone help me
Hi fellows, I'm currently experiencing an issue for 2 days with an EA that use MBFX system and candles to trade. I don't have a high level on programing with mql4, so I took "OpenTiks" from the CodeBase as base for my EA. Perhaps i missed some codes that were in the original EA and that could
I want to find the pinbars circled in the attached image below. For the one on the right, the body is about 1/5th of the candle size and for the one on the left, let's say the body is 1/7th the size candle size and it also has a wick of 1/7th the candle size at the bottom. How can I use the iOpen
Not necessarily a troubleshooting topic but how come with the MQL4 language there is the stigma of including slippage in the CloseOrder function? I don't think slippage is a factor when I manually Close an order so why do you suppose slippage is absolutely necessary for an automated program? All it
Hi all, I am trying to test this indicator but sometimes it moves and doesn't stay centred in the indicator window. I am sure it is something very easy to fix, I have attached a screenshot to show the issue. Hope someone can have a look. Thank you
With the latest update, the strings set with ObjectSetString do not work any more with my horizontal lines. Why
Hi, is there a way keep OrderComment() at TP/SL and also when OrderClose partial ticket as it's can be done manually? Thank you in advance
Dear All, I wonder if anyone can help me in this topic. I am new to MT4 coding but somehow manage to get what I expect but at one place I stuck. I have prepared indicator which shows previous week high and low with some addition pip lines. Now I would like to add specific levels figure next to lines
Hi. I am converting a single currencyindicator to a multipairs indicator and I would like to know the correct way to proceed. The indicator I am working on is a keltner channel, which works ok on the current symbol, however, I don't fully understand how to use IndicatorCounted() on a external pair(a
On Debian XFCE Buster Wine MT4 on both the Terminal and the MetaEditor we need to press ALT every once in a while bc the key gets "stuck" in a weird glitch. Anyone got a fix? Would be so great if they did a native AppImage https://appimage.org/
Does anyone know why if I run exactly the same backtesttwice (with the optimizer) the results, the order in which the passes are made ... and so on, are different? LAUNCH-A: LAUNCH-B
I am a beginner, would like to inquire coding EA Condition 1.After pin bar close price "+" 3 pin bar >>> open "Buy" order at pin bar 4(Open order at open price) 2.After pin bar close price "-" 3 pin bar >>> open "Sell" order at pin bar 4(Open order at open price) 3.EA open only 1 order per time and
how to get the account balance and equity to work in strategy tester ?Not the "real account", but in strategy tester. Looking for indicator that displays these values. Any reference is appreciated. Thank you
Does anyone by any chance have or know of a Profit/Loss alert indicator/EA, that would send an email alert when for example, Profit/Loss reaches -15 or any other custom negative number? Above an X amount would be nice also, but yeah
Hi all, Can someone help me with this indicator? I am using IC Market and mt4, but it seems to have an error. It wont create an ex4 file even if I already copied the indicator in the indicator folder of MT4. I have also restardet the program several times but to no avail. It seems to have an error
Dear community, i would like to announce new free software for the community. Its called "EASetup" and its able to create installation software for Expert Advisors, Indicators, Scripts, Sounds, DLL Files, Executable files and many more file types. Here is an overview about Features: Support of...
Trying to update EA which has already been installed on terminal (on my VPS so same terminal etc) and says it's going to use one of my activations any reason why
Due to the backtest by loading the data into MT4 and converting to different time periods. At first it was good but then later became n / a every time, so I would like to give suggestions for fixing
Hi All, I wrote a simple EA and back tested it and it game a loss. I tried to debug the EA by putting the good old Print statement. when I ran the EA again on the same currency and same period, the results turned to profit! just simple print, compile and then back test again and the whole result is
Hi all, When an indicator such as the "Awesome Oscillator" has an email notification in the input section how do I set up my Mt4 account and my email so the indicator will send me an email to my mobile when there is a signal line cross for instance. I don't want the ordinary alert for bids
Hi, I have created a bunch of EAs using Strategy Quant and am backtesting these in MT4 on a demo account. Originally, i wasnt getting any trades created at all and i checked the journal, it said there was not enough money on the account. I chucked in a million demo pounds and the trades were
Hi guys. when we change timeframe or close metatrader paltform, OnDeinit() function is called. I need to code whether timeframe is changed or Meta Trader is closed. Is there any way to check and distinguish this difference
Every time I try opening a trade mt4 says trade disabled please verify operation parameters and try again later
These 2 EA's execution speeds are very different, I take it due to the fact that in first one there is the declaration at top and in the second one there is only the declaration inside the OnTick() function. Is this all there's to it
I just found out about op_buy_limit and op_buy_stop. In my current understanding op_buy_limit and op_buy_stop fall under pending order, but it is listed as position that I have when I iterated OrdersTotal(). So this make me confuse about mechanic behind it. If I want to find out, just opened
Hi I'm a complete beginner on MQL4 but using what ive learnt so far, i've built an EA which puts a strategy ive developed into practice. However, after figuring out how to only trade once per bar, I realised that the trade only opens at the beginning of the candle eg. at 10:00 rather than when my

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
If you do not have an account, please register
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.