MQL4 and MetaTrader 4 - page 175

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
Hello All, I have coded myself a little scanner that looks for my signal and notifies me when it sees one. At the moment I have to have it on all the time frames. There must be a way for it to scan all the time frames from just one chart,is there? I have been looking through code base but can't spot
Good day friends My electricity went off. After restarting my computer and my MT4 trading terminal the MT4 terminal shows "no connection" I made sure that my internet connection is working properly (I can browse the internet with google chrome) I have clicked on "rescan servers" with no change I
Hey guys, am programmer with C++, python java and JavaScript knowledge. I would like to build an EA or an indicator for mt4 platform. Where do I start on that
Hi, To pass mql4 string to dll in C I see this articles: https://docs.mql4.com/basis/types/stringconst https://www.mql5.com/en/articles/1391 so in my dll I do this : struct MqlString{        int size;       // 32 bit integer, contains the size of the buffer allocated for the string        LPWSTR...
Hi everyone. I need to make a loop and go through all the graphics of my MT4, and check on which of them I have an expert installed. in MQL5, with the function "ChartGetString" and the id "Chart_Expert_name", I can achieve it, but in MT4, it is not available The closest thing to that function in
Moring Is there away to get rid of these info flag on MT4? Thanks T
  HedgeMultiCorrelation needs help  (121   1 2 3 4 5 ... 12 13)
ok i have tried to add the correlation indicator to this multi hedge EA as entry filter. It doesn't work correctly. I'm sure that i did not code it correctly. can someone take a look at it. i think that it is based on igorad's multiposition EA then someone else added something but i don't...
I can't see my account. My internet is fine. I don't know what is wrong. I tried re downloading the application. It is still giving me the same headache. I use Mac OSX and it was working before. I
There is a deviation/slippage setting in MT4 that prevent slippage over 1 pip, it is also 0.5 as default. Mlq5 claims the trade will not open until this condition is met, but yet followers of signals complain of +4 pips slippage! Is this setting not working