MQL4 and MetaTrader 4 - page 172

I know when you are creating a custom indicator , you can create a truly dynamic array to operate as a buffer where you are don't ever have to state its size. I was wondering if the same this is possible when creating EAs, currently I get the obvious out of range error with the code below. Example
Hi, I'm trying to write an indicator to be a quick note on the chart, which do the following - Clickable buttons which change color after clicking - The latest selected or deselected color will continue across all timeframe, and then clicking changing timeframe on the chart - The button color
I have found a divergence indicator which i would like to code into an EA, which buys when a green arrow appears and sells when a red arrow appears. The arrows both have buffer numbers, but when i run a simple EA that prints the buffer values at each candle, the value is always 2147483647.0 whether
Hi I am running some MT4 / EA on a VPS. I have worked perfectly, but I always feel hat I need a killswitch or similar to it if the VPS provider have problems.. So, what if I cant access my VPS, are there any way to by local access to the MT4 account kill all automatic trading? I did try to just
I'm a beginner in MQL4, I just want to ask if the code I've written is correct - or is there a better way to write it. It's working well as expected on backtests, but things go wrong when I try it on a demo bot with multiple charts. I want to get info about the last order's price of the same chart
hello friends is that I am doing a code if it is compiled but when I go to do the backtesting it says error order Send error 130 what can I do //+------------------------------------------------------------------+ //| Inversor Cristiano.mq4 | //|
Hi  I am very new to MT4 and would like to learn in details. I have three chart windows open, each chart with different time frame. I would like to synchronize all these three charts.  So When I draw any indicator or trade line in one chart, I would like to appear on other two charts. Please can you...
For some reason the MetaEditor only looks good reset to default. I can set the backcolor like Moccasin and be off~ but it just doesn't do very well on the eyes unless it is black and you can set it high contrast white and black but it doesn't help any at all and then it dawned on me that I must not
I understand that such feature is available in cpp, because the `.h` file and `.cpp` file can be separate and it's to make sure when you include a `.h` file you don't recreate the functions again. but I didn't see any explanation about why in MQL also we need to separate the function implemenation
I have a certain block of code in OnInit() function which I only want to execute once everytime the indicator is attached to the chart, but I dont want it to be executed when the timeframe is changed , so it there a way to accomplish this
[Deleted]
  calculate profit in pips  (15   1 2)
Hi can somebody tell me how i calculate the profit in pips in the history trades?because i wrote this but when i check the profit is 110$ and it show 0.0473.? <CODE REMOVED>
Hi I tried to make an indicator that shows MACD trend. Can anyone tell me why MACD_trend function is not working? #include <Ehsan\\Objects.mqh> #property indicator_chart_window #property strict #property indicator_buffers 6 //----------------------------------------------------------------------[
Hello, I have been trying to develop the scalping algorithm (with some 5 - 10 pips SL & TP) and i have encountered with the drastic change in the algorithm behaviour: I ran the back-test on 3 moths period, from 01.04.2021 to 30.06.2021 and it threw out this kind of lose/profit pattern -->>
Hello, I am trying to close my trades based on 2 separate types of criteria, 1. Regardless of what the profit is, close the trade after 1020 seconds. 2. If my import value changes from -1 to 1 or vice versa, close it regardless of any other variables. So far, my code works fine with 1 criteria
Hi folks, I am new to mt4 and am aware that I can place multiple trades on the same pair. However, when I try clicking on either buy or sell multiple times it seems as if I'm not allowed. Could this be a setup issue? I'm also aware of "group trades" but I'm not interested in that, really I just want
My code below is running into error 5008 and from my understanding it's because I'm not closing the csv file after reading it? However I have closed it but don't seem to figure out why this is popping up. My files are in the MQL4/Files folder so my file path is correct. Can someone please tell me
i want to convert this MQ4 indicator to Pine script indicator so that i can use it in trading view need support
  send order  (3)
hi guys , i wanted programing a expert that do trade after close the current open order, but it some times dont work, do u have any idea whats the problem? as u see it opens many trades in same time,but not before 15:18
Hello Traders I tried connecting my mt4 for email alert notification using Amazon Vps to automate 24/7. After entering all the parameters using: SMTP server: smtp.gmail.com / also switched by using port 465/25 and co SMTP login: my email Password: ******* From: my email To: my email I keep getting
Hi, I seem to have this problem across all my EA's it doesn't effect the performance but it is annouying me. "Couldn't modify the order due to 0 no error". I can't see why it is even running this line of code as it does modify the order. I have put it in a simple buying script so you can see my
Hello all I have this part of code: double HMA1D = iCustom ( Symbol (),First_TF, "HMA4" ,First_TF,First_Period,First_Divisor, 0 ,Shift); double HMA4H = iCustom ( Symbol (),Second_TF, "HMA4" ,Second_TF,Second_Period,Second_Divisor, 0 ,Shift); double HMA1H = iCustom ( Symbol (),Third_TF, "HMA4"
Is there a limit to the number of EA's I can load into one MT4 Platform
This Ea is one I have backtested and achieved 90% modeling quality on four and five digit brokers and have found good results.I enclose Ea and backtest report.
I will write an advisor free of charge but one at a time, email whoever needs it http://forum.fortrader.ru/index.php?board=3.0
[Deleted]
Hi, I try to use a button and a spinedit on a control panel (Dialog). When the following code line in OnChartEvent() function is commented out, the button works, but not the spin edit. On the other hand, when it is commented in, the button does not work, but the spin edit. cpInterface.OnEvent(id
Hello, the new update of MT4 1340 does not allow me to operate properly with my EA. Can I use the previous version of MT4 to continue operating? for example with version 1320? Can you send me a download link or send me the MT4 version 1320? I wouldn't want to update it. You can also send me with
hi i download metatrader4 from robo. and i opened demo account. i have 80 trader but metatrader show me 40 trade. doesmetatrader delete data after a period? how long is that
I'm writing a code to detect a chart that is running a specified EA. I know the EA name. In MQL5, I use ChartGetString(chart_id, CHART_EXPERT_NAME) to detect if a chart is running the specified EA. MQL4 does not have ChartGetString() but has WindowExpertName(). However, WindowExpertName() returns
Hello all, I am trying to install my EA that I have downloaded to my Laptop. Works fine on my PC and I had no issues installing it there or my VPS. My LQDFx MT4 terminal is installed on my C drive and no fancy folders. But no matter what I do it just comes up with "No MT4 Terminal installed." Any
Hi, I need your idea. I want to check if there is orders which closed withing 2hours from current time. If there is closed order within 2hours = true. If there is no closed order within 2hours = false. My code bool OrderClosedwithin2hours() { datetime closetime = CurrentTime()- 2 *??? //How can