Expert Advisors and Automated Trading - page 70

To post a new topic, please log in or register
Question: Does terminal.exe return an exit code other than 0? Description: I'm using python to automate optimizations. An optimization will fail, for example, when none of the parameters are selected for optimization. The journal gives this message: 2018.01.24 10:58:52.653 Tester  no optimized...
Hello, I trade with the tengri-EA (Gridsystem), but I do not understand why the EA close sometimes a few trades at the same times before, the trades are profitable (see sreenshot). For the EA is this TP-achieving, but the trades from sreennshot were not in profit. I have attache the...
Hi, I try to increase my variable secondCounter in every second, does my code here work? And both of these function still won't work in Strategy Tester, am I right? int secondCounter = 0;int OnInit(){   EventSetTimer(1);   return(INIT_SUCCEEDED);}void OnTimer(){   secondCounter++;} Thanks.
  mt editor sl tp problems (24   1 2 3)
ive figured out how to add indicators to mt editor but I cant figure out how to set sl etc also I cant set the TP and its well up there is there something I need to down load to do all of this any help please ? :/
I hav been using trailing stoploss coded into the EA. Works fine. The only catch is that if  contact is lost it does not work. The trailing stoploss can also be set manually on the terminal. As I understand it it is then handled by the server, which means it will work even if contact is lost witht...
I've developed an expert which I have tried to optimize as much I can to allow as accurate backtesting as possible.  But now I realize that much of the overall time spent is actually spent between returning from my expert and before I get the next tick. I'm using M1, backtesting 10y. I'm recording...
I've built a pseudo inheritance since mql doesn't allow this, here's what i did. //+------------------------------------------------------------------+//|                                                                  |//+------------------------------------------------------------------+class...
I am porting my code to MQL5 I have a requirement to access the brokers group name (System type or the category that a symbol belongs to). The code below works in MT4 - I found it on the web.  Anybody know how to get the same information in MQL5?...
Hi, I am developing an EA where I use technical indicators to generate signals... But meanwhile, I am thinking about getting some external signals to receive somehow in digital form and then use them in my EA. Is it possible to receive such signals from some (free) signal providers in a digital...
  Observer Pattern (27   1 2 3)
Hello everyone, i'm tryng to implement the Observer Pattern as described here (https://www.tutorialspoint.com/design_pattern/observer_pattern.htm) but i'm failing really hard. This is what i coded #include <Object.mqh>#include "Subject...
I´m trying to integrate MT5 with an external Named Pipe Server application written in C# through named pipes. The problem is the app requires a Asyncronous named pipe, and I can´t find a way to connect to it from MT5. I´m using the example from&nbsp;https://www.mql5.com/en/articles/503: void...
Hi, How Can I create a Move Average with levels ? I need to add two level to MA... like this sample.     //+------------------------------------------------------------------+ //|                                                           MA.mq5 | //|...
  iMFI with iMA (10)
Hi,   I'm trying to code a iMFI that has a iMA inside it... the iMA will get the "first indicator's data". but I cann't find any sample to understand how I could code this... I tried to code it my self , but isn't working... the iMA is not getting data correctly.  http://pastebin.com/vpPmg2MY
Hi, I'm trying to use partialclose but it's not working, I think that this mt5 is only for hedgeing Could someone show me a similar function/code for partialclose that works with netting mode? I  buy 2 and to partialclose 1 contract. I  sell 2 and to partialclose 1 contract. thanks
Hi, I use this part of script to place a BuyStop order or SellStop order. It works fine when I have one position of a type (Buy or Sell). But when I have 2 position of the same type it places 2 orders at the same time even if I set to not do it with (TotalSellStop<1) (TotalBuyStop<1). How can I fix...
Dear all, Goodday. My broker increased the minimum distance to place buy stop order to 10 pips away from current price. For example, if i want to buy stop at 1.2010,i can only place buy stop order when price is below 1.2000. Sometimes price does not move below 1.2000 for me to place a buy stop order...
I'm writing an EA, modifying my EA written for MT4. I open an order using OrderSend.  Simply if I need to understand (perhasps from History), if the order sent (by the way.... I have to check Order, Deals or Position?), has been closed because it has reached StopLoss. I checked on forums, but I have...
Hello guys Am in miami florida , i wonder if i can find any Expert Advisor Programming Training Course in Miami ? 
Hi All ! I want to know the effect of uninitialization on a running EA , like changing the time frame of the chart from M30 to H4 , is it the same as Removing the EA from the chart then reloading it again on the chart ? Thanks for your precious Help :)
Hi, I'm runnng this code to increase the lotsize in steps:    double lotsize = 0.01;   double lotstep = 0.01;   for(int i=0; i<10; i++)      {      lotsize += lotstep;      Print("i: ", i, ", lotsize: ", lotsize);           } What I get is this result: 2018.01.12 17:15:58.644 test decimal case...
I have had a few problems working out how to use tick store.   Ignoring this issue for now, I decided to download data and create a set of 1 minute, 5 minute etc up to 1 hour files and then import them directly into MetaTrader. When I ran the strategy simulator, I got a nice long green bar and 0...
Hello, I have been searching for edges (intra day trading strategies) in the market and studying the chart day to day. I also programmed a few strategies, but I have not back test yet. The strategies I build usually seek 1 trade per day if setup signal is true. My plan is to define an in sample...
To get all deals from an order we can go though the whole History selecting the ones that has an DEAL_ORDER equals to our order ID. Any more efficient way to do that? We have a HistorySelectByPosition, but I miss a HistorySelectByOrder or something like that.
  Copy array (1)
I want copy close arrays. ========================================== {Mq4:} double ls[256]; ArrayCopy(ls, Close, 1, 1, 256) How copy close arrays in mq5? ========================================== Thanks.
Hello,   I'm lookingfor a mql4 programmer to build an Expert Advisor from several indicators and tradingrules.   I can payfor this job.   Are youinterested ? Regards,
Hi, I am stuck with an error Retcode 10014 that happened once and i can't replicate again. That error appeared on closing an order.  Error Message :  I understand that the problem is on volume but if the system manage to open such as that  order with this volume why cannot close it with the same...
Hi, I want to use quotes from two brokers on the same excel sheet by using DDE but it doesn't work, it's just showing the same quote, how can you solve this? Best regards
Hi, I am new to Metatrader 5. I noticed tool bars are missing in Visual Strategy tester which means I cannot draw the trendlines, Fibs etc. Do I need to do anything for this functionality to work or is this not available in MT5? This works in MT4. 
  EA EXPIRED (4)
Hi everybody i have download one EA in somewhere, for me is good because i follow his work and sometimes i close or i move TP in manual  ..problem is this : at the end of the 2017 EA is expired there is someone that can do reverse engineering and cut off or move foward the date of expiring ?? I have...
Hello! Thank you for having a look at this thread! I'm looking to use multiple EAs on the same symbol and the same timeframe but each EA has its own magic number. Could someone give me a short algorithm which will close an open position which was open by a EA which has its own unique magic number?...