MQL4 and MetaTrader 4 - page 300

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
  Help coding simple indicator  (15   1 2)
hello, i'm trying to code an indicator derived a alert on next candle as previous candle mean if current candle in green to send a alert as buy in next candle and if last candle is red to send a sell in next candle any help please
Hi I have a trailing stop on my winning trades that works very well. Is it possible to have a similar trailing stop on losing trades rather than a hard stop loss. Can the stop loss be adjusted/ decreased as the price moves in my favor? Here is the code for my trailing stop loss on winning trades
Hi guys I am starting to get familiar with mql4 EA but I am stuck at a certain point. It would be great if I could get some support. I writing a script for EA and couldnt get past this point. I am checking for conditions in daily chart and if it is successful i want to check another set of
Guys, Need help with syntax. I need to find Second Candle of the day's Open Price . The code below works for first half an hour of the day, then it does not produce the result i want because of "0"(Current Candle). Kindly guide me with the right syntax. if ( iOpen ( Symbol (), PERIOD_D1 , 0 ) ==
Dear Forum, noob question for you! I am looking to use the iLowest & iHighest functions, to find the prices of past candles. I don't understand the output however - is it in pips or is it a price? For example I used iLowest to find the lowest value of a candle 5 ticks prior. I used the following
Hello, I am newbie here, so sorry if something wrong with this post. I am working on loading csv structure to array and I am getting this error Structures or classes containing objects are not allowed. I found https://www.mql5.com/en/forum/255091 but not helped me with this error. CSV file consists
hi guys i try to se over the candel a little arrow i create this script it create a rrow but not over the candel and when i zoom it the arrow is so much over anyone have some suggestions ? thankz //+------------------------------------------------------------------+ //|
I guys, I need some help. When I override an HLine object with the mouse, Mql4 draw a label that contain a text of index and level price of Hline. How can I read this text by an Custom Indicator, or an EA or a script? Tank you for every help
I need someone who can build an expert advisor for me
My trading strategy doesn't include trading trading news events, if USD has news at 5, I won't trade it from 4-6, can anybody help me figure out how do i make my EA do this. Thank you
Hi everyone, I searched in forum but cannot find how to open an URL in MT4 and download a file from an URL. What I simply need is 2 scripts: - One script that open an URL (string type) that given in input of the script. - One script that download a file from an URL, such as: http://www.domain...