Expert Advisors and Automated Trading - page 413

My EA work at day time. It opens orders at the begining of the day. In jounal field: "2014.08.29 04:02:57.736 '8043706': instant order buy 0.01 EURUSD at 1.3183 2014.08.29 04:02:58.161 '8043706': order buy 0.01 EURUSD opening at 1.3183 failed [Market is closed]" It means market closed so...
Hi everyone   I have a simple question.  Why the EA from M5 work so well with poor tick like 25% data and work so bad with the same config with 99.90% tick quality? I can find in google many imgs of backtest very powerfull, but all have 25% of quality, so not close to real situation. The EAs normaly...
Hello, while testing my EA in the strategy tester, there are no Alert() (OK, they are found in the journal) or MessageBox() pop-ups. Also PlaySound() is ignored. In the MT4 "strategy tester" all these features were included. How is this with the MT5 strategy tester. Is there a way to pop up a...
Hello, I managed to make an EA to alert me when stochastic crossovers are being taken at oversold and overbought states. I made it by the following rules if the moving line is higher than the signal line and is below the 20 line its going to alert me through push notification. same concept for...
Hi, thanks for reading. I have this trailing stop, my problem is "PositionGetDouble(POSITION_SL)" is not working or only it work when "PositionModify" works? Here i am debugging and "pos_sl" is 0.0, why?...
  The danger of small numbers  (11   1 2)
Have some code that checks MA crossovers. I discovered that I only got one type (I think it was positive cross overs) but not the other one Changed the code and it works ok /* last = ShrtMA[1] - LongMA[1]; // No good. Yes, "last" is a double if(last>0) result = 1; if(last<0)
[Deleted]
Good Afternoon, Does any one know if there is an way to prevent .set file being read ? If I have 2 different EAs and .set files, nowadays, MT5 allows me to load the files and gives mo no warning if I switch them. Any idea ? Regards, Marcelo
I have a doubt with my EA . During the simulation the Lot % / profit do not change . For examble i have $ 1000 and i use 0.2Lots know $ 200 for 1max trade the profit is $ 50 every TP15Pips ( for example ) So: D1000,0.2minlot , 0.2maxlot , TP 15P = 50 D2000,0.2minlot , 0.2maxlot , TP 15P =...
hi there all, i recently started using this code here https://www.mql5.com/en/articles/344 to route orders out of MT5 using a socket bridge, and i wanted to route ORDERS, not DEALS, so there is no need to wait for the Orders to become Deals after execution (dont want to get slipped by the delay)...
Hello, Does anyone know a possible solution to use a OnTimer() alike system which works on the backtester. Right now the code doesn't get executed in OnTimer() as it is not functional in the strategy tester(Backtest). For my strategy it's an important part and i really need it for optimizing...
Hi. I'm new to mql4 language, but I understand the basics. I'm testing my EA on Stretegy tester, but noticed that on some pairs (USDJPY,USDCHF,USDCAD) lot size calculation is off. I use this function to get tickvalue and on real trading it works fine, also on most of the pairs in Stretegy tester...
[Deleted]
Hello forum, good day. What would best way to check for the average of %K and %D of the Stochastic indicator in MQL4? I need to evaluate if (%K + %D) / 2 >= n. Best regards and thank you in advance, codeMolecules
Hello, i want to use Adaptive Moving Average and in have no idea how to use the buffer, i test it in the same way as i use the normal EMA input int AMA_Periode = 9 ; input int AMA_Schnell = 2 ; input int AMA_Langsam = 30 ; input int AMA_Shift = 0 ; double AMA[]; // Stundenbasis int AMAHandle= 0
Hello MQL5 community, I generate a trading signal from an external application and I would like to use these signals as input for me EA. There can be no more than one signal per single day. As soon as the external application generate a signal a new line is added at the end of the file containing...
[Deleted]
Hello forum, good day. I started learning MQL5 before MQL4 and I'm having a bit of trouble translating an EA to MQL4. Here is where I'm stuck: MQL5 code: void OnTick () { int total = 0 ; for ( int i = 0 ; i < PositionsTotal (); i++ ) { if ( Symbol () == PositionGetSymbol
Hi, for example when i use ExpertMACD demo from MT 5.0 its posiible to change the parameters of MACD indicator from this EA based on Standard Library? How to do this on-the-fly?
  Z-Score
Hi, Regarding the formula of the Z Score (found @ https://www.mql5.com/en/articles/1492), Z=(N*(R-0.5)-P)/((P*(P-N))/(N-1))^(1/2)where:N - total amount of trades in a series;R - total amount of series of profitable and losing trades;P = 2*W*L;W - total amount of profitable trades in the series;L...
When I make deal, then I know (risk) sum of money what I can loose (in program (OrderCalcProfit()) that is Profit with minus of course). But when I want to put that sum in EA I need StopLoss Price. I thought I can calculate it with cycling: double CalculateStopLoss(double Price_Open, double Side,...
I wanna connect my EA to an ORACLE XE database. Does anyone have any experience belonging to this? Does anyone have an idea to solve this issue? Or is it just solved? If it is possible I don't wanna handle with java. What about OCILIB? http://orclib.sourceforge.net Is it possible with it? What...
Why in Strategy Tester ChartSetInteger(ChartID(),CHART_EVENT_OBJECT_CREATE,true) returns false with an error code 4211 (ERR_CHART_NOT_FOUND)?! Not in a tester it's all good an working. Does it mean we can not use CHART_EVENT_OBJECT_CREATE in MT4 tester (v.4.00 Build 765) ? Here is the piece of...
Is there any way how to define function like "Print" in order to pass a number of variables? I'm advanced in C, but I can't see any option how to do it in MQL4. Is it possible?  Thanks in advance :) 
I was wondering would I need a buffer if I was creating trend lines and deleting them when price touches for example I have 4 lines for 2 high points and 2 low points between 30 candles. if all lines were created and price touches line 3 and it deletes how can I make line 3 create a again but on the...
There was recently an interesting topic on Russian forum, where the discussion started from a poll on the quality of code produced by freelancer to finally shift to a discussion on the best way to retrieve the name of a timeframe (as s string) from its mql4 value. The big divergence start from the...
Hello everybody, Does anybody know why the limited timer resolution of metatrader is about 15 milliseconds ? For example this code return an average gap of 15 milliseconds : int OnInit(){ EventSetMillisecondTimer(1); return(INIT_SUCCEEDED); } void OnTimer(){...
Hello. Anyone who could help adding wav sound for PlaySound? Thanks.
My question is, is there any way of having chart events in strategy tester? I'm trying to create a order management panel, but when I open up to strategy tester the Chart events aren't being processed. I tried it with a simple EA of just having a print statement in the OnChartEvent but nothing got...
Hi I'm getting error during testing new strategy related to Moneyfixedlot. Someone would be able to help me out ? I have look it up and unfortunately, I was not able to find how to fix that. " CMoneyFixedLot :: ValidationSettings: 1.000000 to 1000000.000000 " I have tested many EA- some of them, I
Hi guys , Please i need help with contents for my Heiken Ashi candles EA . I have the functions below, HA1=iCustom(Symbol(),0,"Heiken Ashi",1,i); HA2=iCustom(Symbol(),0,"Heiken Ashi",2,i); HA3=iCustom(Symbol(),0,"Heiken Ashi",3,i); HA4=iCustom(Symbol(),0,"Heiken Ashi",4,i); I want to know the...
I run my EA on a VPS. Today, USDJPY orders closed by the EA at the non-existent price. This is not a small amount. How this happen?    https://www.mql5.com/en/charts/3070874/usdjpy-h1-fbs-inc-this-trade-make-me-loss-how-this-happen 
Hi, everyone.     I'm almost new to mql4 programming but I have been around programming some time in other languajes. I'm trying to code an EA that runs at once several Strategies but I found a problem when coding, as all Strategies use the same program but may have different parameters, when I...