Hello! I used to write in mql4 and now coming back I'm having a very hard time getting my ea to work using mql5. One example, in the past I've been able to use something like this: for(int i=0;i<10;i++) { variable[i] = iMA(Symbol(),0,13,8,MODE_SMA,PRICE_MEDIAN,i); } This was great! I...
I have been playing around with EA's for a while now and came to this theory. Some EA's makes profit good and fast, some EA's makes profit slower. Some EA's lose a bit of profit and then later starts making good profit. It all depends on the way your strategies are set up within the EA's But now I...
I want to implement some way to log my OpenPositions, modifyPositions (SLTP changes) and closePositions (by EA or by SLTP) to generate some metrics. So I read the docs: onTrade and historySelect to implement a code to print all Deals and Orders history. The SLTP operations are in the history, but...
I am using Custom max optimization mode. I have the following list: Running single test (using right click on the above) I get the following in the Journal: OnTester result 16.70300875033711 The difference is quite big. And 16 is the correct number. After some investigation I have found the for...
Has anybody developed any EA using Simple Moving Average ? If yes, is it effective? How to avoid trading on multiple crossovers in short time (in a flat market). Any effective solution for this? Thanks in advance
Is there a reason why you cannot encapsulate a nested struct or class like in C++? Here is an example. void OnStart(){ BClass b_object; b_object.private_member_of_A.data1 = 10; printf(IntegerToString(b_object.private_member_of_A.data1)); }...
The overall aim is create a code that increases lotsize by "x" ammount every time you lose. so if anyone has input on that that would be awesome. My idea was to use the HistoryOrderInfo include file to access history to find when a trade has been lost then increase lotsize for next trade....
For those whove read it im trying to use the Trade.mqh include file. In the Trade.mqh theres a segment for closing a position "CTrade::Close" Ive been trying to use it but its not working. Heres my attempt void OnTimer() { //+------------------------------------------------------------------+...
I use MT4 this code was work well, but it can't work on MT5. Please teach me. Thank you. I just get MagicNumber. int MN() { int Maggic; for(int i=0;i<OrdersTotal();i++) { if(!OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) continue; if(OrderSymbol()==Symbol() &&...
Can somone tell me why its saying 'else' - illegal 'else' without matching 'if'
im looking for an extreamly simple bot to be made for me. Im just looking for something that will place a buy and a sell every 200pips or so with a 200pip profit. is anyone able to do this or show me how to go about it or know of a bot that all ready in exists?
Because there are a lot of indicators, We are going to try to create an automatic sales program through the open indicator "HalfTrend". Buy a 'long position' on arrow from the blue arrow and settlement(liquidation) it to red arrow and buy a 'short positon' on red arrow, liquidation on blue...
Hi, I am using 1 VPS for 1 account where many charts with many EAs are running. Now I would like just some of the charts to be deactivated. So the whole setup on my client shall stay the same. However, for tonight I want to deactivate the CAD pairs and copy the whole setup to the VPS. Is there an...
Hi Does anyone have any EA that places pending orders in trend lines, based on the object name?
I'm using strategy tester to simulate a custom EA. There is a combo box on the strategy tester which there are the following options: "Every tick", "Every tick based on real ticks". My doubt is about the use of the "Every tick based on real ticks". I know the "Every tick based on real ticks" is...
this ea does not work on my instaforex US-cents accounts ,it always shows ERROR:0 but works perfectly on USD accounts and demos too.what could be wrong in the setting?
I have been working on the theory of market management for half a year now. Of course, most will say that it is impossible, that the market is more chaotic than the universe itself and that it is impossible to manage it! But I believe that this is not true. Of course it is impossible to track 100%
Hi do any of you know if an EA for trading Binary Options with a profit exists?
If so how do you need as a broker and how much will such an EA cost?
The best thing would be if a real trader did the trading and via the EA placed the trades for his or her disciples :-)
Is it possible to get the performance results of each EA still? Thanks
[Deleted]
I've been a FX trader for a few years now, and am looking at building an EA based on the trading strategy (trading sets) I use - but have no idea about MQL4..... is there anyone that would like to collaborate
So, I read a lot about the actual performance of an EA being sub-par as compared to the strategy tester results. Most of the time, when I look at the pretty screenshots of people's EAs and see this fantastic equity curve, I'll immediately look at the spread they used. You'll notice that most of the
Hi everybody, I'm using MT5 build 1510 with a MetaQuotes-Demo Account (Hedge). The server is MetaQuotes-Demo Server. Here a simple EA copied and slightly modified from MQL5 Reference / Standard Constants, Enumerations and Structures / Data Structures / Price Data Structure: int g_fp; int...
hi every one i need the code to buy when color of volume indicator == green & volume >=3000 & period time == h1 i tried icustome(); but i failed please help
i try to change my mode from the netting mode to the Hedge mode, so i want to selct the histroy order with MagicNumber and Symbol, i use follofing code double last_deal_volume(const string symbol, const int magic) { double deal_price; double deal_volume; double deal_profit; // ---...
I need to get if the candle is green or red programatically. I already tried to use MqlRates and MarketBookGet to recover this info, but with no success. Can you help me?
Hi, what is optimization good for? And how does it work? Regards
Hi, I'd like to make an entry system that is a little quicker than manually creating orders. After identifying an AB boundary, I'd like to place 5 entries on specific retracement levels, 38.2%, 50%, 61.8%, 72%, 86% all with the same stop (behind the A). The target will start at the 161.8%
I want check all currency Bid price NormalizeDouble( MarketInfo(TradePairs[i]+suffix,MODE_BID),MarketInfo(TradePairs[i]+suffix,MODE_DIGITS)) But this code return Wrong bid price For example return result for NZDUSD 0.7273500000000001
I have the '*.set' file for an EA. In the MT5 user guide I read that this file is located in Tester directory.
How can I open this '*.set' file to read its content? Also, should it have the same root name as its EA for it to be applied to the EA?
Thank you.

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.