Expert Advisors and Automated Trading - page 203

To post a new topic, please log in or register
Hi: Sorry for this - but I remember a few years ago there was a discussion around this (I hope I remember correctly). If certain criteria are met - the EA activates a function of some sorts in order to close the workstation. If one or more of you remember this discussion - would it be possible to...
How can I test an Expert Advisor in automatic trading mode using a ticks.csv file I have previously downloaded? Thanks Joe S.
I want to make an EA to execute automatic trades based on my custom indicator. How would I add this to an EA? Thanks Yes... I'm new to EA programming
  datetime sums (1)
I'm hoping someone can confirm this for me, since I'm having a difficult time with an EA adjusting for timezones. if I have a datetime value, and I want to add for example, 3 hours to that time, could I use this? datetime RightNow=TimeCurrent();int Adjust=3; //3 hours adjustdatetime...
Hello, I'm looking for information if MT4 support MQL5, because I'm not sure for that. Thanks for reply.
Good Afternoon ! Any idea why this happens EVEN rebooting both side machines ? I have also rebooted all of them and even so I still have some ports not working ! (pict atached) Thank you MRC
Good Afternoon ! Any one have a clue on this ? If I have an EA with 2 iMA (for example) and each one has its own ENUM_TIMEFRAMES/ period. If I want my EA to run both separated timeframes and unique timeframe using a key to compare my concern is when using single timeframe mode, Strategy tester...
[Deleted]
Hello community, this is my first topic.  I am trying to build my own DLL for Metatrader 5 using C++ and Microsoft Visual Studio Community 2013. I just coded this simple function here:   #include <string> using namespace std; #define _DLLAPI extern "C" __declspec(dllexport) _DLLAPI string __stdcall...
good evening, Im trying to add a costum optimazation paramater to the EA strategy tester and i have two questions about it, What i'm trying to do is to seperate my data from a single optimazation run, lets say from december 2014 till februari 2015 into data from single months. I'm trying to create...
Looking for an EA who is buying / selling based on earnings announcement of a stock immediately in the first second after release. Decision if buy or sell order is made depends on the fact if analysts expectations are beaten or not. The hardest thing is reaction time, I assume need some pretty...
Hi, i am Peter, i started yesterday my first DEMO-Trading on the MetaTrader 4 Platform of QTrade, but after a trial of 1 month i want to change in a Live-account. I am excited about the possiblities, and hope to find some advice on this platform. I am thankful for any advice, because i am a...
Hello. I would like to know if the code of a script is the same or at least similar with an EA's code. If for example i order a script, and then i want to attach it to an EA, can it be done, or it will need to be written all over so that it can be inserted in the EA? Thank you.
Hello, I have only been learning to code with MQL4 for a couple of months and I am looking to write an EA which opens a trade when MA cross and closes the trade when they cross again. I need a helping hand as the EA won't seem to close the trade. Thank you. Here is my code: extern double...
I am a new person to EA and have been playing around with back testing an EA i found. I have got it to the position now where i want to REVERSE the buy and sell instructions in the EA - so where currently it is set up to buy then i want to change that to sell short and where it is set up to sell...
  Error 132 (4)
Hello everyone, I'm new in the community and I am writing because I have a problem with the opening time. For example with the DJI, the first bar daily after the close of the market opens at 00:00, but my broker opens 01: 00. The problem is that I use an EA that opens only at the beginning of...
hi i dont understand how to find the high and the low of the last 2 minute candle i use this code: void OnTimer() &nbsp;&nbsp; {&nbsp;&nbsp; datetime thisTime = TimeLocal(); MqlDateTime tm; TimeToStruct(thisTime,tm);&nbsp;&nbsp; currentHour = tm.hour;&nbsp;&nbsp; currentMinutes = tm...
Hi guys, I'm new to MT5. I'm trying to demo a few paid expert advisor strategies in the Strategy Tester but when I hit start, I get no data in. I'm using the MT5 demo account so I'm not sure if that has something to do with it but essentially I can't test any of the EAs. I attached a screenshot...
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?...
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 /*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;last = ShrtMA[1] - LongMA[1];&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// No good...
Hi there, Is there any variant for this to get only todays orders ? HistorySelect(TimeCurrent(),TimeCurrent()); << does not work (looking for something like this) HistorySelect(0,TimeCurrent()); << gets all orders Thank you MRC
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...
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