MQL4 and MetaTrader 4 - page 54

Hi, I have a problem. If I change the timeframe on a chart with EA running, the object what my EA writes stay unchanged. I like the write on the chart example the profit. After TF change the profit write refresh doesn't work, I see example 0 if the start profit was 0. Here is my code from my EA: int...
Hi guys, let me say first up, I am absolutely not a programmers butthole. Right, now that’s clear, recently I put a job on the freelance page for a EA to be created that observes 2 moving averages cross, then waits for a pull back. The pull back is defined with a minimum and maximum figure in pips
Hi, i am trying to code an indicator that draws lines between swing hi and lows but the code I have is connecting the hi/lo of the candles in between. In the diagram I would like 1 line between the H and L or L and H as shown in yellow in the diagram and not many segments for a single line. Thanks
In MetaEditor, "Edit" menu, "Advanced" option, there are 'Comment' and 'Uncomment' options. They work for me, but only from that menu. Can I use those tools from the keyboard? Next to the 'Comment' option, there is an indication of key combination Ctrl+'. I am not sure what character is that. Is it
Hi ! Why my EAs do not reopen trades after midnight, but closes open trades after midnight that was opened before midnight ? Thank you. (MT4 on macOS Ventura 13.3.1 with Wine for Windows emulation)
Hello, I recently realized that my code for detecting moving average crossovers was not perfect. Instead, it is the classic code that is generally used by EAs. Here is an example for US30 (backtested in visual mode in order to see the values ​​of the moving averages at each bar opening): - At point
Hi, I want to sort the Array. but I want to sort except zero (0). Is it possible with ArraySort code ? double Array[ 7 ]={ 0 , 3 , 0 , 2 , 4 , 1 , 5 }; ArraySort (Array); I want to get below. Array[7] = {5,4,3,2,1}
Hi, Here's the scenario: i use the tester to test my indicator (A). The indicator uses M1 bars but is running in M5. I create a template Tester and add the same indicator with a different parameter (B). So, while executing the tester, (A) is updated just fine but (B) always stay the same. So, i dug
I noticed this on terminals sometimes. The client will login with the broker ok, but the DC list is completely missing. Only the option "login" is there. But why does this happen? and how do I get back the rescan servers option along with the list of DC servers. Even if there is only 1 DC, it
Hey all, I tried coding an EA with the following strategy: 1. BUY MARKET ORDER WHEN CANDLE PRICE CLOSES ABOVE THE 200 HIGH SMA 2. SELL MARKET ORDEN WHEN CANDLE PRICE CLOSES BELOW THE 200 LOW SMA 3. IGNORE SELL ORDERS WHEN PRICES IS ABOVE THE 100 EMA 4. IGNORE BUY ORDERS WHEN PRICE IS BELOW THE 100
Hi All! I have read the documentation and read all the related topics in the forum, but still cant find out what the problem is. This is the path of the file: C:\Users\danie\AppData\Roaming\MetaQuotes\Terminal\2C68BEE3A904BDCEE3EEF5A5A77EC162\MQL4\Files\test.csv (This is the real path and also this
Why the profit on attachment picture is not correct on back testing? Please help me. It must be 100*0.2lot*(1850.627-1841.673) = 179.08$ Thank you
Code that works on win 10 fails on win 11. Is there a simple fix? Thanks for the help, George Change Time Frames all charts //+------------------------------------------------------------------+ //| ChangeTF-All.mq4 | //| Copyright 2010, zznbrm |
hi i made this trailing profit script the problem is that the take profit followes the price as it goes up and down, while i want to follow just as the price rise ( for a sell order, and opposite for a buy) i don't know how to fix it, i know the problem is that in ordermodify i use the take profit
  MT4 & Excel  (3)
Is there anyone available that has a good knowledge of the MT4 platform and excel spreadsheets. I am trying to find a way to automatically send the Account History data from MT4’s Terminal window into excel to keep my database of trades and associated charts up to date. Is this actually possible
  Martingale with step  (12   1 2)
Hello guys, nice to meet you, sory for my bad english, i just started to code EA two weeks ago, and i need some help with my martingale strategy, i've been struggling for almost a week now. Short story, my code is execute an order when MA is cross, either up or down, and when order hit stop loss it
I have a mql4 code from a few years ago, and when I compile it through the metaeditor it doesn't run in the metatrader, and if I put the code in the metatrader so that it is compiled right there, it works. What can be done
  OrderSend delay  (5)
Hello, if I try to place many orders successively from one EA then I get a delay 2-4 seconds between each order. Why does it happen and how can I avoid this delay? Thank you
  Negative Indices  (6)
hi everyone, i have an indicator and there is a variable "r" in that code that starts from -1 . if you change it to zero, the first candle doesnt have amount. i want to know why is started "r" from -1 . i want to write this code to another language , can someone help me ? Thank you :)
So I have a great computer and great specs and never have issues with going over on my cpu or memory (even when the issues i am talking about arises) On the weekends like Friday afternoon, all of Saturday and most of Sunday if I have a lot of mt4’s up, they run super slow and freeze up. During the
why i cant to download mt4, can you help me
Hello I am using a VPS from a German zone. It can't install MT4 (installed from the official setup.exe). It freezes as shown in the picture and I've tried with several brokers but encountered the same problem. P.S. I tried installing it on my personal machine in Thailand and it worked normally
I coded a break even code. But when I run it, sometimes it shows order modify error 1. I just want to move stoploss to zero(0) but I tried to use = 1 to avoid order modify error1 Can you advice where the problem? extern int MoveToBreakEven= 2 ; //BE_Start Pips void BreakEven() { int exitTypePer
Hello, i want to write code to solve problem: Input the price and order buy or sell it. But it wrong because some case ( Most of buy). And i think add bid and ask price. So i write the code: First, this is code not add bid-ask price: //Val == 1 is sell, val==2 is buy //And sl is in input. if (val ==
Hi all, I created a dashboard for my expert advisor using graphical objects. I decided each object's position and size using OBJPROP_XDISTANCE, OBJPROP_YDISTANCE, OBJPROP_XSIZE, OBJPROP_YSIZE. Since monitors with different resolutions are not available, I wanted to understand if in some way the
Hello; I wrote a routine that will activate a trailing stoploss. It works as it should. I have the MT4 platform forward activities to my phone under notifications (Tools -> Options -> Notifications) Problem I am having is that every tick the trailing stoploss gets adjusted my phone will beep (notice
I have developed the below code to try and sum all open stop losses, across multiple currencies in the portfolio and then express as a % of the Total Account Value (in USD base currency). I don't get an output that makes sense - can anyone help improve the code to give an accurate and stable result
Are there any quick commands for objects like lines, rectangles and more in meta trader 4
Hello. I tried to write the following code without using history file. But there is a problem. I couldn't figure out what price value data[][1] returns. I would be grateful if someone could tell me. Source code removed by moderator because it is only useful for scammers and not for proper EA code
[Deleted]
iam using the peroid converter script to get The H12 offline chart but the chart is missing one candle look at pictures below: look at the time , one should be at 00:00 and one should be at 12:00 , but they are both at 12:00 thanks for your help