MQL4 and MetaTrader 4 - page 337

im trying fixing an old rsi ea...but im fail ++//...need professional
Hi there, I'm a newbie and I have a problem with a part of my code. I would like to close my trade at 21h45 every day, even if the position is positive or negative. Here is my portion of code. I don't understand why it's not working: for(int cnt=0;cnt<OrdersTotal();cnt++) {
  C++ dll design  (10)
Hello. I am studying programming in MQL4. I have a question whether the pattern from this article https://www.mql5.com/en/articles/5798contains the correct syntax for the class written in C ++ for MQL4? I have a few problems and I do not know if they result from a poor dll design
Hi there,  I am attempting to validate my EA for the market.  My EA trades only the EURUSD and it is required to be attached to the 1M chart. Why is the automatic validation checking for other symbols and higher timeframes? Is there a way to work around this issue?              Test report for...
[Deleted]
hi guys, i have an issue with the Automatic Validation Process, in the Draft stage. It ends with an error (OrderSend error 131-Invalid trade volume). The validation fails there.Can anyone suggest me which part of my ea code should be checked and how to be corrected in order to eliminate that error?...
Hi I have an EA where i want to tell the code (including the Strategy Tester, if that acts differently) to skip a test if a condition is not met. I am new to MQL4 so i chaecked the web and found i could possibly use "break" is this correct and if so would strategy tester stop or just ignore one test
  For loop help  (2)
Hello friends, I'm new to MQL and fairly new to MQL5 community so I really hope I'm asking this question at the right place. I intend to upgrade this simple 3 bar entry criteria with a for loop so that I can give an extern variable later on how many bars to look for. Original code: if(Open[1] <
So i have an account with a broker and they have tight spreads on a razor account or something like that,about 0.6 on gbp/usd. The thing is if I put on a sell stop or a buy stop trade, and the stop loss is say 3 or 4 pips ,when the trade gets triggered it gets closed also ..if i put a 5 pip stop
So this is what I want to do: Send a notification to my celphone BUT i only want it to send it maximum once every x time... lets say 1 notification each 12 hours if the condition is true. Thank you
  Time[0]  (7)
Good morning everyone. I need to know what is the function "Time[0]" in MQL4 and what it do. Can someone please help me
In order to maximize trading opportunity, i entered into multi pair EA coding community. The problem in it so far is dealing with chart that are not opened in the chart window, refreshing the chart to get latest tick and most importantly getting the EA to read accurate tick data when OnTick() is
Hello. I'm learning coding in MQL4. I'm having trouble getting a string from my C++ dll file. I tested in MQL5 works without a problem. Can somebody help me? C++ code: PROJECT1_API void fnReplaceString(wchar_t* text){ wchar_t replaceText[] = L"987654321"; memcpy(text, replaceText
Can somebody help me to make this Macd detect divergence between oscilator and price, and draw arrows on detection? #include <MovingAverages.mqh>#property indicator_separate_window#property indicator_buffers 4input int InpFastEMA = 12;input int InpSlowEMA = 26;input int InpSignalSMA = 9;input int
  icustom problem  (1)
hi guys i use this indicator <Deleted> for icustom, but print zero (0) for me help me for solve this problem thnaks my code : //+------------------------------------------------------------------+//| zigzad customm.mq4 |//|
I had a chart with many trend lines I had drawn. I deleted that chart by mistake. I tried to 'undelete' the chart, but it's not even on the list of deleted charts so I can't recover it. I have a backup of the entire \\Application Data\MetaQuotes\Terminal\ folder and I thought I could restore the
  Partial OrderClose()  (20   1 2)
Hi All, In MQL4 language, if we use OrderClose() function to close just a part of the lots of the entire position, the EA will close the actual position ticket(number), and create another position ticket(number) with the remaining lots. OrderClose(OrderTicket(),(OrderLots()/2),Bid,3,Pink); I need to...
I have the below method, but it returns an invalid pointer, wham am I doing wrong? RunningOrder _runningOrders[];RunningOrder* RunningOrdersHelper::LowestBuyOrder() { RunningOrder *result = NULL; for(int i = 0; i < ArraySize(_runningOrders); i++) { RunningOrder current =
Hi senior forum members, I am learning how to use class to declare a group of functions to be methods of a class - which help the EA to be more semantic and more OOP-ish Enclosed is the original EA which draw Support & Resistance lines and display some market characteristics base on the last closing
Hi I can't find anything about DRAW_BARSHIGH DRAW_BARSLOW DRAW_BARSOPEN DRAW_BARSCLOSE in the documentation or any where else. are they for drawing custom candles? Anyone can give me some info
Hi all! I made an indicator which scans 28 forex pairs in 5 timeframes for a pre-defined setup. In this example I just scan for a candle's close above the previous candle's high. My question is now if my code is an elegant and efficient way to do it. I don't think so because the indicator is
Hi everyone, I am running several EA's from the MQL VPS. Many low value trades go through each day. I wanted to track the performance of each EA but I cannot sort the Trade History on MT4 by EA Identity (magic number). Is there somewhere else I can see the trades sorted/filtered by EA? The only way
A timer within a EA that loads all watch symbols and supposed to weeds out the ones I dont want: Sorts the List and displays the data    list.Sort(sortVar);   posY++;   list.displayData(var,posY,sortVar); the timer void:...
I've written a few EAs which access various chart objects - eg a text label "BUY" generated by an indicator. BUT, it seems that when migrated to MQL VPS my EA can't access the objects, and looks like the indicator is not even uploaded to the server. I tested this by placing a simple text label on a
Swing Failure of RSI is well-recognised trading pattern. Just Google it: https://www.google.com/search?q=rsi+swing+failure I'm asking if somebody has coded an indicator, which automatically recognizes it - any maybe draws on chart or places orders
hello good day.. spent 20 minutes writing the codes and explanation.. mistakenly reloaded this page and everything was gone.. i tried to covert it my coding got the buffers but all colors became blue
Hey guys, First post here, but lurk alot. Recently got into learning programming and mql4, so i apologise if this has been answered multiple times before...but i couldn't find anything that fit So i have a custom indicator that draws horizontal lines on my chart of x periods, and i'm trying to
hi Guys, when you have a few min spare, could you take a look at the code and see what im doing wrong please. #property indicator_chart_window #property indicator_buffers 3 #property indicator_color1 Yellow #property indicator_color2 DodgerBlue #property indicator_color3 Red #property
Hello; I understand that MT4 platform allows for automatic execution of a script at startup using the command "start terminal.exe <script subdirectory\script name>" (without the double quotes. In my case the actual command is: start terminal.exe config\start.ini config is the subdirectory where the
Hi, I am new to the metaquote language and have problems with programing a trailingstop that works. Can anybody help me with the code. Mine is changing the stop correctly when themarket moves up but it also changes it when it moves down even if it shouldn't,this in the case of a Long position....
Hello friends... I'm looking for a way to save the entire MQL4's help page as a pdf just like MQL5's help page. How can I do it