Expert Advisors and Automated Trading - page 10

To post a new topic, please log in or register
Hello everybody, what I would like to do is to write a simple expert advisor that does this three steps: 1) open a csv file for writing; 2) writes bid and ask prices in that csv files, in different lines; 3) closes the file. I would like to put these three steps respectively in OnInit,...
Good day, how do I get the Parabolic SAR value for the previous candle?
Hi foks, Im new here and just trying to figure out how everything works here.  What is a good robot with high win rate? I see on mt4 more robots available then mt5 but im only able to run mt5 on my MAC. Can I get mt4 robots working on mt5?  How does it work? I added on one my chart but nothing...
Hello, Im writing an EA which I want to keep an position's open price in double 2d array. (Please focus on the highlighted price) from the above log, the value on the left is the expected price which I would like to keep it as an index. The value on the right is the actual price that I find the...
Hello everybody, I need your help, someone could recommend me a good expert advisor for MT4; I've been testing the experts advisor from the Market but they all look like a scam. I hope your answers. 
Was wondering if it work on two time like 15 and 30 min and can it  double up on orders I am new so wandering 
I've written an EA (with help of existing code I have found on the forum and the net) that reads in information from the experts log file. However, I need the information in real time, and the log file is only updated in intervals throughout the day I think, when the terminal is closed, or when you...
I am trying to create an EA that will trade multiple pairs although only loaded on one pair. I have created the following two variables: string   Pairs[28] = {"AUDCAD, AUDCHF, AUDJPY, AUDNZD, AUDUSD, CADCHF, CADJPY, CHFJPY, EURAUD, EURCAD, EURCHF, EURGBP, EURNZD, EURUSD, EURJPY, GBPAUD, GBPCAD,...
Martingale: The gambler doubles his bet after every loss... There are a few complicated Martingale math papers floating around and even those are mostly about roulette but I thought of a way to make a really simple math based presentation. First of all I am assuming the goal is to make as much...
When using a custom symbol or 3rd party data (CSV File) I sometimes get this when trying to run the backtest. Does anyone know why this happens?
hello together When the EA is started, it is started briefly, but deleted again at the same moment. The error is as follows: array out of range in "DeepFeedForward.mqh"  (94,25) (DeepFeedForward --> that is the MQH file) Unfortunately I am still a beginner in coding. I would be really happy if...
I am relying on the new MQL5's function WebRequest in order to consume a RESTful webservice from an EA, however I can't POST some JSON data this way: string headers;char result[];string signal = "{\"ea_id\": 1,\"symbol\": \"AUDUSD\",\"operation\": \"BUY\",\"value\": 0.9281}";StringToCharArray(signal...
Is there a way to get the starting date time of indicator and EA at every valid instance? Thanks in advance
I'm getting this error - error fill not supported - when trying to close a position using the mt5 trade.mgh  include file. The ea fails to close the position. I've serched everywhere and cant find a solution. Is there a problem in the mgh file below?? bool CTrade::SetTypeFillingBySymbol(const string...
I'm trying to build an EA that can only allow a second trade (Position) only after the 1st trade is 10 candles behind. Tried this but didn't activate any trades->    MqlRates PriceInformation[];    ArraySetAsSeries(PriceInformation, true); int testData = CopyRates(Symbol(), Period(), 0,...
I've got a strange problem with the strategy optimizer recently: it starts the first few iterations with results that make sense, from then on all results go down to the minimum, like this: It happens with different EAs, so it shouldn't have to do anything with the specific code. What is further...
I need an to call a python script in my expert adviser when OnTick occurs which I did via ShellExecuteW. However, I need to EA to wait until ShellExecuteW finishes its job. Is that doable ? I have read this too... https://www.mql5.com/en/forum/285244 Apparently the right way is :  if...
Hi guys, I'm using the Think Centre Tiny to replace my VPS - its silent, fast and almost no limit to the MT4 instances - demo and live accounts. There's just one problem: every now and again I lose all my activations, i.e. my purchased EA's are no longer valid. Suddenly from one day to the next I...
Guys please help me with the above code. I am trying to write an EA that will set trades on the open of every candle.  1. Problem is its not closing the open trades before it opens a new trade.  2. The stoploss and take profit dont always get set. Any help will be appreciated. Thanx. </>extern...
I was trying to code on "is there any trade near by with in certain pips or not" Does any body thinks that is it possible to check whether there is any opened position within the range of certain pips from current tick data. I was trying for that and end up with nothing. If any one could suggest me...
After compiling it shows that "not all control path returns value" where is the mistake? Can anybody suggest me? bool DTNAR(){double DTNAiPtFc=100;double buyprice,sellprice,pointDTNA,AskV,BidV,pacal;buyprice=MarketInfo(Symbol(),MODE_ASK);sellprice=MarketInfo(Symbol(),MODE_BID);if(DTNAiPtFc>0)...
anyone know EA that can hide Open position ? or maybe is it possible to do that? will be shown when the position closed This is for copy trade purposes, so they cannot copy trade for free.. Thanks anyway
I get the open price value from the selected position. Assume that the selected position price I got is 0.20 Then I sum it up with 0.1. So, I got 0.30 for the first calculation. When I do it multiple times until the value is 0.50. When I do the calculation for 0.5 (plus with 0.1 again), I got 0...
Hi Does anyone know where I can find a expert that closes my deal once price closes above or below a moving average? I found the code for MT4 but not for MT5.
How can I align a label to the top right? I made this helper class, using the Standard Library. I do set the Anchor property (using  https://www.mql5.com/en/docs/standardlibrary/chart_object_classes/obj_controls/cchartobjecttext/cchartobjecttextanchor), but it has no effect. The label is positioned...
Hi everyone, I hope I opened this thread in the right section. The problem I have is the following: I am using an EA that has worked flawlessly when using it with brokers with "normal" Forex symbols (meaning symbols with a suffix) so far. My my new broker however uses a suffix (".i") behind every...
Can anyone please assist me on how to get the LOT-size changed utilizing ExpertMAMA?
when looking in the journal the orders are not even trying to be modified. i assume there is a problem with the if statementsdouble Trailing_Stop = 100;int init(){   double ticksize = MarketInfo(Symbol(), MODE_TICKSIZE);   if (ticksize == 0.0001 || ticksize == 0.001)   pips = ticksize*10;   else...
Hi guys, I just ordered the MQL5 VPS for the first time and I want to make my EA run on it. I created the charts and added my EA settings and I got the happy smiling emoji on the top right of the chart. However, when I click on "synchronize with VPS", the happy smiling emoji changes into a sad one....
  OPEN TRADE (10)
Hello sirs.  I want to know if can I open trade with an EA based on the alert message on the chart?  If alert message "buy"then open buy position.  ..?