MQL4 and MetaTrader 4 - page 70

Please help if you know what's the problem. My EA opens trades incorrectly, it opens the sell trade first instead of the buy which is the moving average. I want to open the buy trade first (Moving average) then if it goes opposite (10 Pips) direction open the sell, vice versa. void OpenTrade() {
Morning all I have an EA which is designed to send a confirmation email when an order is executed. The 'orderselect' (Not to be confused with the MQL4 OrderSelect(...) function) function is called in the OnTick() section of the EA. Just to be clear, I am aware as to the implication of the OnTick()
Hello. I cannot receive test email notification. Is there a setting related to recepient side or there is a problem with mt4
hallow gays, when I switch from one timeframe to another timeframe the data of the indicator changes, are there any potential reasons
i have a problem on error 130 its on BTCUSD everuthing are okay exept the error about the tp and sl, i tried to up these but nothing change pls help me
Hi All, My strategy tester is showing a loss on a long trade which I bought 25.15 units of at 5360.63 and sold at 5404.44 which should have given a profit of ~ 1101. Instead I got a loss of 70. Can anyone please explain this to me? Some additional info: I'm using MT4 on Windows supplied by FPMarkets
Hi, can anyone advise how to make code to sort floating point variables as simple as this example for integers? Thanks #define nl "\n" int OnInit () { EventSetMillisecondTimer ( 500 ); return ( INIT_SUCCEEDED ); } void OnDeinit ( const int reason) { EventKillTimer (); } void OnTimer ()
  LBR + 1000 pips in one week!  (323   1 2 3 4 5 ... 32 33)
Hi! I made oscilator according to LBR rules from VT, and signal indicator to it. It looks proftable for first look, but mabye U will help to improve this idea. Regards Kale
Has anyone already coded url encoder in MQL4, that could be paired to the PHP urldecode()?
Hello, There is a coder who is developing for me an EA. I backtested the EA on 2 different MT4 version, one version is sponsored by IC Markets, and one version is sponsored by Vantage. When I run the backtest while logged in to a IC Market demo account on either one of that 2 MT4 versions I have a
I have an EA which is supposed to place a pending order with the push of a button, & an execution price at the open of the current bar. The button functions works perfectly, the parameters within the pending order work flawlessly, the dynamic pricing displayed in button which changed on every tick
Hi all, I'm trying to introduce some logic using GetLastError(), and having trouble with it. Here's the bit of code I'm working with right now if ( GetLastError () == 0 ) PlaySound ( "news.wav" ); else Print ( "Open order error: " + errortext( GetLastError ())); PlaySound ( "expert.wav" ); My order
For years, I was reading out BB into a double and worked perfectly fine using a hard coded timeframe (i.e Not using Period() as an argument), this gave me the chance to change timeframes without changing my strategy: period: 5 ; double UpperBand = iBands ( Symbol (), period, 20 , 2 , 0 , PRICE_CLOSE
[Deleted]
Hello everyone, I don't understand why this simple indicator cause so much lag... I have 150'000 bars on chart and loading this indicator literally freeze my mt4 forcing me to restart it, I can't understand why if I load the default MA indicator that does not happen. Here's the code: int OnCalculate
Hi friends, Today I was going to update my code and when I used the styler feature in MQL4, I suddenly understood that with the new update, using the styler feature causes some undesirable changes with the ELSE IF structure. I want to have the previous structure of the ELSE IF not the new one. I
Hi all! I'm trying to use the PlaySound() function, and my EA is grabbing the sound files from my MT4 install's data folder. There are somehow a couple of files in that folder, but the ones I want are in the MT4 application folder in Program Files (x86). How can I get my EA to look in the latter
I'm trying to solve an issue with an order, but my broker won't help me without a trade ID. Is there anyway for me to access one without the mobile app? Is there anything I can do? Or are all apple users just fcked
The program should use volume that is greater than average and support and resistance levels to determine buying and selling opportunities. If the volume is greater than average and the price breaks out either up or down from the support or resistance level, the program should place a trade with a
Hi, im trying to code a variable that will be the index of a candle at a time to start scanning the candle for various price points. int LHSearchcandle = iBarShift(_Symbol,_Period,StrToTime("09:00")),true); int HLSearchcandle = iBarShift(_Symbol,_Period,StrToTime("09:00")),true); the above code
The MetaTrader 4 platform update will be released on Friday , December 10, 2021. This build provides the following changes: The minimum supported desktop client terminal version has been increased to 1340. Older terminals will not be able to connect to updated broker servers, General fixes and
I'm currently using NormalizeDouble() to edit the precision of a calculation to 1 decimal point. I'm displaying this number on my chart. Most of the time it displays as e.g. 10.1 or 10.6, but when it calculates as a whole integer the visual spacing changes momentarily. How can I get this number to
  Pending Orders  (3)
Hello! I have a question… lest assume that I place a pending order at price 0.1230, with. SL at 0.1220 and a TP at 0.1240. And the price gaps from 0.1229 to 0.1235. Pending will be activated at price of 0.1235. The stops prices will remain as initially set
Someone has already solved a similar problem, but the solution seems too complicated to me. https://www.mql5.com/en/forum/156865 Example: I have value of RSI 73,21 or a variable that is keep storing: eu= iRSI ( "EURUSD" , _Period , 14 , PRICE_CLOSE , 0 );eu= NormalizeDouble (eu, 2 ); If value is
Hi, can I make the code of one trading account to read the number and type of the positions in one of my others trading accounts. Thank You
#property indicator_chart_window #property indicator_buffers 3 #property indicator_color1 Red #property indicator_color2 Blue #property indicator_color3 Brown #property indicator_width1 2 #property indicator_width2 2 #property indicator_width3 2 double shortMA[]; double longMA[]; double
Hi there So I have an EA which places a Pending Order at the opening price of the current candle, and expires at the end of the current candle. My code is below, I have even printed an error function in order to diagnose any errors that may occur, however, according to the EA, a pending order is
  Triangular moving average (TMA) ...  (770   1 2 3 4 5 ... 76 77)
The purpose of this thread is more personal ... At some stage (some 4 years ago, posted it at this post : https://www.mql5.com/en/forum/175938/page17I ) coded one variation of an indicator that I named TMA centered. After that somebody shortened it's name to TMA and ever since I am receiving emails...
input int TakeProfit = 10 ; // hard set number (converted to points in EA) input int pipsOffset = 5 ; //Number of pips above or below candle for entry and exit input double Lotsize = 0.01 ;
I optimize my EA. it take too long to pass data and not show result . Although it passed over 100 data , it not show result in optimization results. So I stop optimization , it show error as 2022.04.19 03:45:16.130 ZigZag EURUSD,M15: initialization failed (1). zigzag is my custom indicator used in
I am testing some order code in Renko chart. What I want is to place an order at the beginning of a new candle. In normal chart it is OK, but when I use Renko chart. I observed many entry on the same candle. Do you have any solutions ? if (lastAlertTime != Time[ 0 ]) { OpenOrder here