I'm trying to create a dynamic Take Profit programatically. To do this I am using OrderClose() to close the order when the difference of pips are ready. The problem is that it is closing above the OP_SELL and bellow OP_BUY and I don't know why it happens. how could I fix this ? See the image
I wasn't having this problem before. It first happened yesterday after installing it two months ago. I was in the history center about to download data. A malware would seem very unlikely as I only use the web browser for email, log into my forex broker and the occasional forex related search. I
Hi, everyone. I've tried to find the solution for this over multiple forums, but it does not seem to be an explored topic. The goal is to write MQL code to open a script multiple times specifying either parameters (2 of them) or some specific preset. There are going to be multiple configurations
Hi, Can anybody help me please ? I know how to find the biggest order in Profit using a for loop. But i dont know how to find the 2nd and 3rd biggest orders in profit. Thanks in advance, Amir
Hello, As I constantly feed my MQL knowledge, I ask you the difference between theese 2 "deinitialization functions" : int deinit()//orvoid OnDeinit(const int reason) It seems that both do the job. What is the "better way" to deinitialize ? Regards.
So I've tried editing this script, Hourly Pivot Points with Color Filling https://www.mql5.com/en/code/20614 almost got it working but there is something wrong in the code when I change it. I tried changing from hourly to more hours than just one, I managed to get adding just one more hour to work a
Is it vooddoo? Why is e-05 added at the end of some of my doubles? A search engine query didn't help.
(23 1 2 3)
This is weird. My Expert Advisor was working and 5 minutes later I couldn't make it work again. Investigating led me to this issue. It seems like some numbers get corrupted, because NormalizeDouble() and other functionstaking doubles as input will only output zero with them. Note that I didn't touch
[Deleted]
hi, i am trying to add commission and swaps option for my code, i am unable to do so, kindly help. #property version "2.00"#property description "The indicator displays profit (loss) on the current symbol."#property description "You can freely drag and drop the line to display the current
Hello community ! I'm looking for multi time frame Fibonacci for mt4 platform
How to get the value of "Select Object By Single Mouse Click" (in the Options->Objects) programmatically?
I have script to change chart window title calling winapi sendmessage (WM_SETTEXT command): If I select other chart, my custom title is changing to previous name. How to set window chart title to be valid even if window lost focus?
[Deleted]
Hi, I'm new in programming MQL4, I'm trying to calculate the mving average of an indicator in an EA. Could someone give me a code example of : - The moving average of x period of the volume of a symbol ? - The moving average of x period of the slow stochastic (5,10,3) of a symbol ? Thanks in advance
Hi, For backtesting and setting the SL and TP values in OrderSend, does it matter significantly if I use Ask or Bid as part of the SL and TP calculation? I don't see any errors when I use either one. I know other posts said #1 is the correct way, but is that only for live trading? For instance
is there anyone who can help me have an indicator for mt4 that indicates the supply and demand zone? thanks a lot
My task is, for eg, when executing EA on EURUSD chart H1, calculate RSI on H1, RVI on M15 and MACD on M5 simutanously to get my result. double myValue = iRSI(NULL, PERIOD_H1, 14, PRICE_CLOSE, 0) + iRVI(NULL, PERIOD_M30, 13, PRICE_CLOSE, 0) + iMACD(NULL, PERIOD_M5, 12,26,9
Hi guys, can anyone tell me how the correct syntax looks like? int timeframes[3];if (_Period==PERIOD_W1) timeframes[3]={PERIOD_D1, PERIOD_H4, PERIOD_H1};else if (_Period==PERIOD_D1) timeframes[3]={PERIOD_H4, PERIOD_H1, PERIOD_M30};else if (_Period==PERIOD_H4) timeframes[3]={PERIOD_H1, PERIOD_M30
[Deleted]
I am working on an EA and one problem I have come across is that sometimes, a tradewill open, and quickly hit it's limit and I will get the profit. However, new tradeswill open in the same bar and I will lose money on those. How can I limit one tradeper bar posted on the chart? For example, if a...
Hello there, I usually solve the problems I encounter on my own, but this time I have run out of ideas. I have another indicator where I do not encounter this problem. My indicator works as expected when inserted into a chart, but when I try to access two buffers with iCustom, both buffers give me
Hello, how do I write in the rows and columns of a .csv(a table)? Also how to search for the amount of occurrences and delete occurrences in a .csv? Code please, as simple as possible Thanks in advance
it is a good indicator but i need an alert when the arrow comes out , anyone know how to add an alert into this indicator? <ex4 file deleted >
Hello everyone coding for candle MA.. but the problem is the EA will not place trade at next candle open.. it places the trades lately my code double m2=iMA(Symbol(),0,MA_Period,0,MA_Method,MA_Price,2); double m1=iMA(Symbol(),0,MA_Period,0,MA_Method,MA_Price,1); double
This is the OrderClose 2020.01.06 01:15:16.766 2019.11.04 18:34:48 Square UP ONLY ONE ORDER GBPUSD .uk+,M1: Order Close Time2019.11.04 18:34:48 The the line get the Order Close Time from the Chart highlighted above I want to update this Order Close Time of 18:34 to all the StopTime Below extern
Hello, grab a string of length 13: 1111 0000 11110 Then make substring of length 4-13 1111 1110 1100 1000 0000 0001 0011 0111 11110 11100 and so on... How to code the above and write every combination of substrings of 4-13 length in a txt or csv file
This Ea draws trendlines using fractal calculations you can choose either for a 2 fractal trend line or a 3 fractal trend line, the Ea should find 2 or 3(your choice) fractals that line up and draw trendline off that, and if down trend will draw trend lines on highs and on lows for uptrend, if...
Hi, how can I save all the objects I made in MT4? I want to save all objects I made on charts as backup so that I can restore all of them on another PC / after format PC. Save as template could only save my chart settings. No object can be saved. This is very important to me and thanks for your
Hi all, I recently encountered an issue related to indicator's historical point, which I would like to have some opinion/idea on what actually happened. Long story short, this indicator is designed to get low & high, using fractals and zigzag. The values of the indicator are stored in an array
would you pls remove my post
Hello there, I recently got a problem with my MT4 running on android 9. First I could not choose another broker account (both demo and real). The app just wouldn't let me pass (authorisation failed). Then I uninstalled and re-installed MT4. Now I cannot connect any of my brokers to it. Did someone
Dear Friends I have a issue which I am trying to resolve for few months already. I am using this script found in attached. I have no code for it. It helped me quite a bit in my work !!! Nothing wrong with it (i guess). Still, if I would like to remove symbols from Market Watch with Hide - either
Hello, I am pretty noob in MQL4 and I am walking a bit in the darkness when working with Objects Functions and Time for an EA. I am writing an EA that has to do something when he finds that an Arrow object with a defined Arrow code that has been created by an Indicator in the Chart. This is what I

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
If you do not have an account, please register
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.