Expert Advisors and Automated Trading - page 152

Hi I want to have a function that I can call from on Tick() that returns a bool if there is a new candle or not for a specific timeframe. I've come up with tis but it's not working properly. bool isNewCandleFormed( int timeframe) { static datetime last_candle_timeM5 = 0 ; static datetime
Hi, How can I calculate the loss at SL? This value indicated here. I have tried using the tick value/size but it's never accurate accross all pairs - mostly fails on gold and indices. Thanks in advance for any help
ResultRetcode Gets the code of request result. uint ResultRetcode() const Returned value The Code of request result. How can I get the result using the above function? in CTrade class I mean. Thanks Please give an example.
Hello, I made a trade asistant which works on forex, but on futires not. This asistant works like this, I click on the chart, and there it will be stoploss, and if click is below Bid it will open a Buy and if click is above Ask it will open a sell. The thing is that for some MiniS&P for example
Hi I have no knowledge of code however I manage to get the first part of building an EA via comparing input from another EA. The last part i have some difficulty, can some one assist me to fix the errors please. I have attached the file ***
In MT5, there is a checkbox to select the "Show trade history". It is the last item on the tab "Show" of the properties window of a chart (click F8). I would like to know, how I can (de)select this property by code (in mql5)! - Usually, I would expect to use the functions ChartSetInteger() and
hello dear friends i need help about martingale trading system for make a strategy that i don't lose more than 3 trade consecutive { i mean if i lose in first trade or even in second i must win in Third trade } pleas any one that know such this strategies introduce me or advice me . thanks so much
Does anyone know an EA that closes all open and pending orders and also the currency pair when another EA reaches a certain profit on the day either with one or several trades
I created a script which highlights the AsianSession but since I was only able to set a fixed date, the range is only highlighted on a particular day. I need the script to be able to highlight the range for everyday on the chart and not just the particular date I have fixed. I at first thought of
When does "error #136" occur and what can be done to fix it? error #136 "Not enough memory to download the source file into memory"
Hi everyone, I'm trying to better understand how an EA handles asynchronous vs synchronous function calls. I edited this post to simplify my question since I didn't get any replies. Assume I have these lines of code in an EA: void OnInit () { ObjectCreate ( 0 ,obj_name,obj_type, 0 , 0
Hi forum, I used custom symbols to download GBP/USD tick data in a .csv file which I have condensed and attached to this thread. I have clicked on the data tab and "Text to Columns" button on the top ribbon to split this data across several columns but now i'm stuck. Can anybody please help me
  iCustom function  (16   1 2)
Good afternoon colleagues, I have tried to use the iCustom function to read the V 75 Super indicator 1 indicator but I have not been able to get the values ​​I want, maybe I am entering the parameters wrong, but I have tried it in several ways and it always returns a value out of 10 when I print
When subscribing to a signal, how does MT4/5 prevent that the user does a simple copy trading to other own or friends/customers accounts
(How) is it possible for a signal provider to get a profit- and client balance height- depending performance fee instead of a constant monthly subscription fee
  Send Error 131  (2)
I am getting a "Send Error 131" on my live MT4 account when running a backtest on my EA. The EA didn't pick up any trades yesterday and should have picked up many. Does anyone know what is going on and how to fix it
Hi everyone! When I compile the code below there are 2 errors: '}' - unexpected end of program Hota001.mq5 89 6 '{' - unbalanced parentheses Hota001.mq5 17 3 But when I add an } in the end, the errors jump to 17. Any help? // Define the input parameters input int ema_period = 9 ; // Period for
Dear Moderator, While updating EA get the follow error in specially ZOMRO VPS. MQL4 Market: failed download product 'CAP Strategy Builder EA' [403] Kindly help how to solve it. Regards, Vipul
  EA Code Query  (4)
I tried the code below to close half the open position once my unrealized profits exceed $200. This did not happen to my trades. Can anyone enlighted why so how what went wrong? I get the error message Error Opening order 129. How can i resolve this? THanks
Hello, has anyone ever experienced the following: I was working on running optimizations the other night when suddenly both the optimizer and running single backtests stopped working in MT5. By "stopped working," I mean that the optimizer and single backtest runs takes zero trades on all time frames
  Want Simple EA  (4)
i want to make an EA based of simple EMA
[Deleted]
Hi everyone I'm keeping getting this error and I don't know why. Tried to search in the forum but didn't found a clear answer, hope someone can help. Thank you! test on EURUSD,H1 (netting) there are no trading operations test on XAUUSD,D1 (netting) there are no trading operations test on GBPUSD,M30
[Deleted]
Hello, I have looked at the: https://www.mql5.com/en/market/rules#part_IV and reviewed my product description.. However, I've even tried to remove all the description and leave a short placeholder text and still there is the warning.. I'm not using emojis, external links nor bad indentation as
I'm working on developing a pattern based entry using this class: https://www.mql5.com/en/code/291 The code for my EA is simple: #include <CandlePatterns.mqh> CCandlePattern m_candle; int OnInit () { m_candle.ValidationSettings(); m_candle.InitIndicators(); m_candle.MAPeriod( 20 ); return (
  python support  (2)
i cannot access the Python documentation anymore. Was the support for Python dropped? Does anyone have a link
Can anyone help me to replace the code of SMA with HMA ? Crossing. Thanks
Hi everyone, I want to loop through all open positions for one symbol and get the position with max. profit. This is my code: int Positionsforthissymbol=0;      for(int i=PositionsTotal()-1; i>=0; i--)   {      string symbol=PositionGetSymbol(i);         if(Symbol()==symbol)...
Hi there, I am new to MQL5 and like to open the settings menu of an EA under certain conditions. After searching the web and here I have not found anything, propably chosing the wrong keywords. Thanks for any help
Few weeks ago I have trouble with my VPS so I have to restart my VPS. But after restart I cant install EA from MQL5. I have asked to my VPS operator, they told me to ask to MQL5 administrator if they blocked my VPS ip address so that I cant install any EA from MQL5. Anyone can help me to solve
I just created a simple indicator with two moving averages , but CopyBuffer for the second indicator keep failing, so the terminal shows only the first moving average line instead of both. The code is pretty simple textbook example: // Configuration. #property copyright "<COPYRIGHT>" #property link