MQL4 and MetaTrader 4 - page 16

I am trying to close all pending orders but it is closing only half of it here is the code i am using if ( OrdersTotal ()> 0 ) { for ( int i= 1 ; i<= OrdersTotal (); i++) //Cycle for all orders.. { if ( OrderSelect (i- 1 ,SELECT_BY_POS)== true ) //If there is the next one {
Hi Coders, kindly help. My mission is to get H1's Bar Shift Number (Smaller TF) based on Higher TF's Bar0 for D1 and W1. int H1D1Sf=iBarShift(sym, 60 ,iTime(sym, 1440 , 0 ),true); if (H1D1Sf==- 1 ) H1D1Sf=iBarShift(sym, 60 ,iTime(sym, 1440 , 0 ),false)- 1 ; int H1W1Sf=iBarShift(sym, 60
Hi guys, I am trying to import some Nasdaq 1 min data to Meta Trader 4. After browsing and selecting the .csv file it does not load (see attached screenshots). I tried it to give it some time to load, but even after hours nothing happened. I thought about the size of the file so I reduced it to 6
  iclose/iopen etc  (10)
The following code does not work - please help I am trying to run this code in strategy tester on period M1 basically i want the open/close/high/low of the M5 candle to figure out the problem i even changed the 0 to 1 in all the code I ran this code in strategy tester for 12/01/2024 - 12/15/2024
If for example I made a string, a bool, and a string array, string A = "CCC333"; bool Check; string List[ 4 ] = { "AAA111" , "BBB222" , "CCC333" , "DDD444" }; And I want to check if the string A exists in the list (where the bool "Check" should turn out true), how should the code be written? I
This is the 1st time I encountered this matter. That I can not download/install any purchased EA/Indicator on my Windows VPS. (it has IE ver.11) But no problem on my desktop. the message "Mql4 market failed downloaded product 403" was on the journal. and the install failed as screenshot attached
I am trying to install a new mt4 on my laptop, but instead of the usual fast install, it is coming up with a box asking for proxy server address, account and password. what is this? Ive never had it before
Do can I use multi line cursor as at vs code or google apps script, when holding "Alt" ? For images and examples simply google for "multi line cursor vscode" Thank you
Hi. Good time. I created a spin button with the following command, but the value does not change. Also, I don't want to use it inside the panel. Can anyone help? #include <Controls\SpinEdit.mqh> CSpinEdit clSpinEdit_NB; int OnInit () { clSpinEdit_NB.Create( 0 , "SpinEdit_NB" , 0 , 10 , 190 ,( 10
Looking for a way my EA can use a trailing stop based on equity for all trades via magic number EA. I would like it to work something like this: If equity profit = + 200, set equity stop (or equity trailing stop) at +100, target profit = +500. So if I do not hit my profit target of 500 cause market...
Hello, I have an mt4 indicator. When I changed the timeframe, I realized that there was an different in the old plots in the timeframe opened. When I add the indicator to the chart again, it plots as it should. How can I make it work as opened from scratch every time it changes timeframe like in
Hello everyone, I'm reaching out in hopes of finding a solution to a critical issue I'm experiencing with MetaTrader 4 (MT4) after installing and subsequently uninstalling Rectify11 and Start11, which are Windows 11 modification tools. The Problem: Initially, these modifications forced all my
Anyone got this issue before? Context: I'm using tickstory to get dukascopy data, and I'm sure I followed the steps to set up the data. But on other machine and trading live, its no problem. Only the backtest fails to even start. Any idea
Hi, I have just programmed my first EA, however I am looking to add a branded icon to the code source but unsure where to include it. I did see another post which was relevant to MT5, however there is no sub folder under MQL4 for images, any help would be greatly appreciated
Just within the last few days I am now not able to login to MQL5 from my MT4 application or even access the website from my computer. The website works perfectly fine from my phone so it does not appear that I have any restrictions on my MQL5 account (nor should I) but trying to access it from my
Dear all, I wrote an EA that allows a total of 5 trades to be opened at one time. However, I only want one trade to open per bar although not necessarily at the beginning of the bar. Therefore, the code written here (https://www.mql5.com/en/forum/216567) or similar variations does not work for me. I
Hi all Below the code I have attached a trailing stop code that only trails when its in profit only. For positions trades it trails ALL the Time which works perfectly fine, as for pending orders not all the time. Sometimes it will trail and sometimes it won't. I have tried using get last error code
This topic has been discussed here many times, but I still haven't found a solution: On a Windows10 PC and a Windows 2022 VPS, I have not been able to log into MQL5 with MT4 for a week now.: Logging in works on MT5. The MQL5 website is also not displayed correctly on these two PCs.: On another
Hi everyone and happy Christmas. I would like to ask you if there is a way like an EA, code, etc. in mql4 to disable autotrading on ADX<50 (ADX value decrease below 50). Thank you for the help
I have a question: when the MA line is inserted into the RSI, it displays quite strangely! MA100 on mt4 PC Ma100 on mt4 mobie Also the MA100 line is placed in the RSI frame! But the display of the MA100 line on mobile is completely different from the MA100 line on PC! So what is the difference
//+------------------------------------------------------------------+ //| i-GAP.mq4 //+------------------------------------------------------------------+ indicator_chart_window #property indicator_buffers 2 #property indicator_color1 LightBlue
Hello everyone, I recently experienced an issue with my broker regarding an abnormal spread spike on the EURUSD pair, and I need advice or insights from the community. Here are the details of the situation: 1 . My broker 's typical spread for EURUSD is around **2.7 pips**. 2 . On the MT4 platform
This EA place only Sell Trade. it not place any BUY Order. EA Use donchian channel Signal for place Order. i am new in coding . any Experience coder fix this issues //+------------------------------------------------------------------+ //| AK-47
Hello, I'm having difficulties using this library and I need someone to point me in the right direction. I'm trying to create an array full of CCandle references, print the contents, change one of the values and then print the contents again to display the modified value. This the code I have at
hello everyone,  renko street trend is really interesting indicator when it is combined with renko chart, but it sometimes repaints, it is a signal bars indicator as you can see in the photo, so i am asking if there are no repainting version ? or if someone can recode it? it needs only one line of...
Hi Coders! I'm looking for a little number to string function. I have a number, for example: 344256454.23 and I would like to print it in this form: 344,256,454.23 Is it possible with bult-in function? Or I have to write this function? Thank you. Relative
  Comparing prices  (7)
Hello, I would like to warn the community about comparing prices. Code like: Close[n] < Close[n+2] is not reliable and gives invisible differences for the logic from what you can tell, when using Digits to limit the number of displayed digits. I just found this out by going a bit crazy on code that
Hi; Got hardware setup to trade MT4 as follows: Laptop with second monitor attached which is used for MT4 only. Works just fine. Except; messages displayed by the EA on screen using MT4 MessageBox command are always shown on the laptop monitor not the monitor I use for MT4 trading. Why is that and
[Deleted]
  freeze level  (9)
Hi, I have a question about freeze level. According teh below line from teh documentation, you cannot modify a market order if sl or tp is withinn freeze level distance from teh market price. " An order cannot be modified, if the execution price of its StopLossor TakeProfit ranges within the...
Hi, phenomenon. This piece of code is rejected when I compile from the editor, but not when its compiled via commandline. Editor compiler reports: "T" unexpected token for the first line. public : template < typename T> T Get( int index, T defaultvalue=(T) NULL ) { // ... if