MQL4 and MetaTrader 4 - page 294

Dear experienced traders I have a question confused me so much, could you help me? In options we can set max bar in history and in chart. Do you know max bar in history and chart affect EA work or not? (A) Only max bar in history affect EA work, so we have to set it as 9999999999999 to make history
how can we command new order on the condition if TP( take profit ) buy or sell another lot if time limit is 1 am to 2 pm and it hit tp on 3 pm onward , we want to take another lot by ignoring time condition. what will be syntax for that
Hi guys, I need a big help. In my indicator I create some ChartEventCustom, but when OnChartEvent is On, it don't work corretly. can you tell me what I do wrong? here there is my code: <Deleted> Tank you too for all help
  Price Line  (2)
Hi everyone, I would like to get rid of the live price horizontal line on my chat on MT4, please. Show ask price is off but I still have a horizontal line which moves up/down depending on the price. Anyone knows how to get rid of it? Please see picture below. Thanks
Hello I am a new in MQL and using MQL4 I have a code that gives index out of range error. Even though I understand the error I could not figure out how to fix it. Actually, it is a part of code which I want to take the moving average of willy r for 5 and 10 days then get the difference and just
Evening all, I have an issue with not seeing custom indicators in MT4. I have placed it in the folder in the data folder location. I previously was using MT5 but I switched back to MT4 but by doing so the data folder only has MQL5 folder instead of MQL4, so not sure if this is the issue on that MT4
I'm brand new to coding. I found a course on Udemy that is really helpful but when I want to do something that the course doesn't cover, I really struggle to understand the MQL4 Docs. For example, it doesn't cover adding objects to the chart. Right now I'd like to add a simple vertical line whenever
Hello coders As the headline says. I'm looking for a simple MT4 EA that can place buy/sell orders, via a point value measurement from the latest High/Low of the current and latest candle. I have searched for tutorials on the suject. And for paid EA's. But i cant find anything. It seems to me that it
<Deleted - Please post in English only> #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 DeepSkyBlue #property indicator_color2 White //---- input parameters extern int Kijun= 26 ; extern int Kijun1= 52 ; extern int ShiftKijun= 3 ; //---- buffers double
hi i write indicator for draw arrow when cross moving array and when i change time farme it mess up //+------------------------------------------------------------------+ //| Tamrin 1.mq4 | //| Copyright 2020, MetaQuotes
I'm wondering how I would note a place in time once discovered through a loop. I don't have any code prepared but my intention is to run a FOR loop looking for the place where the MACD value is higher than the current value. Doing that much I understand, but I now want to look at price at that exact
Hi all, I've found this article about how to add custom indicator to ea. in my code I already create a variable for the input and create the indicator using iCustom function. But when I backtested, it tells me about 4051 error code which is invalid function parameter. Anyone can help me with this
can some one explain the logic dir=((OP==OP_BUY)?1.0:-1.0);
Dear Forum, I've been struggling to read the attached SSRC indicator values without success for days. The value returned by my code is different from what is displayed in the Data Window with same timeframe as the code. For some unknown reasons, the three values are the same and different from the
Hi, I would like that when I take a trade, it automatically open the corresponding chart in my MT4 and when the trade is closed, the chart auto-close. So that the only opened charts are the ones where a trade is currently running. Does anyone know how I could manage to do that
Hi I'm a beginner, could you explain why mt4, during the strategy tester , when he reaches the Take Profit instead of adding the profit to the balance, does he deduct it? Thanks
I am using an EA I struggled to make. It works as I intended it to. Now I want to add an email alert function. The code is trading, however it is not sending me an email when a trade is opened. WhenI run the compiler, I see no errors. I have set up the email server and I am able to send a test email
hi, sorry but I need to ask how to find that "MQL5 Wizard" which said can create a EA in my MT4 ? in my MT4 's meta editor ,, there is only MQL4 no MQL 5 thank you
Hello guys, Was using an EA from the market since last year up to today, my terminals i had a smiley face everything was working, then when i restarted the terminal i got this message: 2020.05.26 01:56:49.815 cannot load
hi guys itry to set the time frame when i attach a script with this code but not work ChartSetSymbolPeriod ( 0 , NULL , PERIOD_M30 ); anyone can help me ? thankz
Hello! I have an issue with my indicator and I'm almost sure it's due to the way I am performing the look back. My problem is basically that when the indicator is loaded, it plots on the chart without issues, but when new bars forms, it doesn't update. Here is the code I am using to perform the
There is talk of maximum drawdown. It was suggested by someone that the tester was not measuring it correctly. I decided to check it. I wrote a code and added it to my Expert Advisor and ran it in the test mode. The results coincided with the tester. The code is provided below. Please reassess the
I am trying to overwrite a .csv file. I open the file, read the contents, calculate the result, then overwrite the line. (for some context, this file will have 10 lines, with from 4 to 25 doubles, the file is read into an array[10][25], processed then written back to the file ready for the next
Hi i have dificulties how to make my marti code to multiply with decimals. I use this this NormalizeDouble but when i attach ea error comes up "Invalid Lots Amount OrderSend Function " but when i do backtesting its works fine this is how i code OrderSend ( Symbol (), OP_BUY, NormalizeDouble
Hi everyone, I've found part of code below about trailing stop loss in the mql4 documentation. I'm confused about this part (Bid - open order price) and (Bid - Point*Trailing stop), what those calculation does? Thank you. if (Bid-OrderOpenPrice()> Point *TrailingStop) { if
hi guys i try to find highest and lowest of yesterday i use this code but for me not work //+------------------------------------------------------------------+ //| OPEN CLOSE HIGHEST YESTERDAY | //+------------------------------------------------------------------+
Hello, I developed an EA that manages the stoploss using the ATR indicator. This EA uses some parameters. Is it possible to backtest my EA on previous trades in my MT4 history in order to find the best settings
Hi, I will like to know about any coder that can correct 7 EAs to pass market validation. I seriously cannot code it. I have tried almost everything, but of course, no what is totally correct : ) The coder can have a copy of the EAs In Exchange. It is certainly a simple task for someone used to
Greetings experts, I'm a noob on MQL. So far, had created more than 3 dozen EAs (very simple ones mind you). My problem is I need to uniformly display information on each chart/each EA goes on like the one below. Every time I need to add more info to be displayed I need to go to each EA and change
  On Arrays  (3)
If you populate an array via a for loop from another indicators offset values (starting with 0), something like: double TestArray[]; for(i = 0 to 9) { TestArray[i] = Indicator(Symbol(), PERIOD_1HR...., i) } Is it already in the correct order to use any of the IndicatorOnArray functions ? or do you