My ea has 2 sets conditions for both buy and sell, uses martingale, Break even and trailing stop. They all work as written on the tester but on the Demo, it doesnt even move. My conditions are: Buy and break even and if previous buy on the next candle open Buy using martingale then trail. For those
Hi All, I am interested in implementing EA through the Strategy Module CExpert Class and etc however reading through the documentation I think it's still lacking. Can anyone point me to any more detail documentation on these classes. Or better is there any examples/explaination (in code) for it
Hello everyone, Please Help me to solve the issue. I tried a lot . i want to get bollinger band Upper and Lowe Line Price, and i already tried to do *** Please Help| Thank you in advance
Hello everybody, I have a problem with my Expert advisor For example : If I want to put Buy-Limit in step 5 Pips of the present price the problem is when the price changes ,the position of Buy-Limit will change to make the same step (5 Pips) my Code is trade.SetExpertMagicNumber(MagicNumber);
I make an EA, on D1 timeframe, sometimes when Open Order or Pending Order Error: failed [Market is closed] error = 132 I know Market is Closed can be caused by various things, but as we know, that the EA is run if there is a new candle that is formed so the EA certainly will not be run if it is a
Just as the topic says
While all conditions are met, my advisor is still not executing certain trades where it should be. For example: *** at this exact moment, the comment at the top left of a chart reads 5 true's, meaning each condition to sell off the current position has been met. However, the candle closes with no
Hi all, I am trying to use the the Python library MetaTrader5 to elaborate the data in Python and then send an order to the metatrader5. I am not able to send an order using the function order_send(). I always receive the retcode 10013. I am struggling with this problem for days. Could someone help
Hi, When I try to place a trade using python with the MetaTrade5 library it give me this error : EURUSD not found, can not call order_check() I dont know what am I doing wrong...Here is my code for the buy order: #BUY ORDER # prepare the buy request structure symbol = "EURUSD" symbol_info =
I need to place in the robot opening positions when the spread is less than 15 points and opening only one position at a time and on one signal or one for 20 minutes
Hi, I red somewhere an EA has a single thread running all of its code, making mutexes/semaphores not needed to handle the code inside it. Unfortunately I have a situation which may require a mutex of some sort: I have an EA that handles both OnTick event as well as OnChartEvent, when the user sends
[Deleted]
I'm new in the world of programing and i read a few articles on writing expert advisors, and i tried to write my own one but i keep getting these two errors :
'}' - unexpected end of program
'{' - unbalanced parentheses
I don't know how to fix this can anyone tell me what should i
thank you
Would like some help here, I'm unable to get a "posOpen" value (Comment(posOpen)) without an "undeclared identifier" error. Here is a segment of the code void OnTick () { double priceClose = ( iClose ( _Symbol , PERIOD_CURRENT , 0 )); // Var holds current close price of bar double priceOpen =
I've created a dialog based on CAppDialog. When I click a control on the dialog, the mouse click passes through to the chart below. I want to use the dialog to select an action , such as a radio group item the action, but only fires when the chart is clicked, not when the dialog is clicked. How do I
Hello everyone, total beginner here : I'm trying to develop an Expert Advisor, and while I am able to test against historical data (backtesting) using the strategy tester , I can't find a way to simply "attach" to a chart and receive live data continuously (most likely in the OnTick() function)
I am attempting to round my StopLossPrice to the nearest tick but there is an error which I don't know how to solve. Most of the time the value returned is correct although sometimes StopLossPrice returns a value similar to x.xxx0000000001. I have tried replacing MODE_TICKVALUE with _Digits
Hi, I am trying to properly use the isNewBar function based on time and I am getting an compile error when I use the code right after the onTick function is called. I tried initializing with different constants and arrays but the program is working as expected and the remaining functions are being
Hi guys! I have one issue...so I have this EA which is having, avoiding major news events among filtering trades. This function is downloading news events from forexfactory and writhting in one csv file. All good and working fine if I load this EA to one chart. As soon as I open another chart and
Question about trying to figure out the efficiency for my VPS. When it comes to copy software like mt4 copier or fxblue personal trade copier--When I use it on my personal computer (great specs), if I make a change to the SL or TP, or open/close a trade it is instant, just super fast. On my VPS
Hi all, I'm looking for a carry trade Expert Advisor. Carry trade means buying a currency that pays high interest against a currency with low interest. We can earn $ if the currency that we buy is going up, only ! If you have any tips, thank you ! PS : maybe you can create such a robot ?
I don't have any code to show. But I'm trying to find a way to put mqlrates into another array.. such as high[] = {rates[].high}; doesn't work...but is there any way to make it work? I see there's arraycopy or swap.. but I've looking for more examples on those
I'm trying to buy and sell at market value with the "Instant Execution" method (see here https://www.mql5.com/en/docs/constants/structures/mqltraderequest).
I have filled the required properties of the request, but OrderCheck returns error code 4756, from the docs:...
Dear Metaquotes, There are currently many flaws in the backtesting report. one of it impact me too much is the inability to link both in and out deal to derive single position. Please seriously consider to show Position ID in the MetaTrader 5 backtesting reports in next update. the order id, deal id
OnTimer - How is the functionality of OnTimer, when in a custom indicator, which is called from an EA?
(11 1 2)
Hello world, I'm using OnTimer in an self written indicator. It should display the time in seconds till new bar (Comment). If I load the indicator all works like I planned. But if it is called by an expert, the counter stucks. I guess, that in this case OnTimer is not used. Do you have other
I have this little logic that is supposed to help me building up cases for names of tree leaves. The names can consist of n terms, say MA1, MA2, MA3, MA4... MAn. They can all be used only once because each of them describe a unique combination of the said indicators from highest to lowest. So it
I'm attaching a screenshot of what happened here. Basically, on candle close above a support line or below a resistance line the expert should open a trade on the next candle. However, towards the end of the day it took a few odd trades, two trades on the same candle in very odd spots. Any idea why
Hi, I have MT5. I've written a nice algo that works quite fast. I wrote a program to try different settings. It closes and opens MT5 on each run so I can change the settings. I can run it overnight, but after about half an hour of multiple tests it slows down so much I have to reboot my computer. In
I've read about ArrayBsearch but from docs I don't know whether it can be used to search for an element in a two dimensional array. I have the following array: double sZones[][ 2 ]; double upperVal = 0.2312 ; double upperVal = 0.2303 ; How can I search through each of the contained double pairs to
Hello, Does anyone know where i can get a simple EA where when 2 Moving Averages cross a buy/sell order is placed - or - When price crosses a MA then a buy/sell order is placed.... I have looked but cant seem to find it..... Anyone have any ideas.... Thanks
Please check the picture attached. Every second it changed from enable to disable, all the time, it does not stop. Anyone knows what it could happened? I have good Internet connection and my EA was working perfectly in the past. Hope to hear from anyone of you soon, MANY THANKS

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.