MQL4 and MetaTrader 4 - page 8

I would like to know how to evaluate the reliability of a backtest based on the modeling. For example, this one
void CloseAll() {double bid, ask, price;bool success; for(int n=0 ;n<=tot;n++){if(!OrderSelect(n,SELECT_BY_POS,MODE_TRADES)) continue; bid=MarketInfo(OrderSymbol(),MODE_BID);ask=MarketInfo(OrderSymbol(),MODE_ASK);price=(OrderType()==0)?bid:ask;
[Deleted]
Hey all, I am writing an EA that uses the Dialog class to display a nice floating window for the user to interact with. Problem is whenever the time frame is changed the panel bugs out creating artifacts on the chart. When testing the basic dialog code(below) I get a failed to initialize message...
I want to draw color candles in MT4. but the bellow code doesn't do anything. The code doesn't return any error but not work as expected. Can someone tell me what the issue is? I tried with ChatGPT to find an answer, it doesn't give any correct answer for this
I was using MT4 on Mac OS Catalina for a year or longer. Yesterday decided to reinstall it. And soft just doesn't want to launch. It is successfully installed. When I launch it - nothing happens, process doesn't even show up in Activity monitor. Any ideas
Why did you post your MT 4 question in the MT 5 Trading Systems section instead of the MQL 4 section , (bottom of the Root page )? General rules and best pratices of the Forum. - General - MQL5 programming forum ? (20 17 ) Next time, post in the correct place. I have moved this thread. Hi
Hello everyone, For the past few days I've been looking for a reliant solution for this issue as many of the solutions I found online have many drawbacks. Market Open or Close - how can I find it? - Day Trading Strategies - MQL4 and MetaTrader 4 - MQL4 programming forum (mql5.com) First of all, I
#property copyright "Ch" int handle,i,Total; int Slip = 3 ; int BuyTicket; int SellTicket; double H1W4_0,H1W4_1,H1W20_0,H1W20_1; double iCH10,xMultiply,zH1W420_00,zH1W420_11; // Init function int init() { if ( Digits == 2 ) xMultiply = 10 ; if ( Digits == 3 ) xMultiply= 100 ; if ( Digits == 5 )
I have about four MT4s opened on a dedicated PC with Win 10 OS (no any other programs opened/running on the PC). For some inexplicable reason, the MT4s keep closing after a while without my intervention (I also do not have any EA that is coded to close the MT4 running on the MT4s), and I have to
how would I hide the depth of market and trade panel buttons
#property indicator_chart_window#property strictstring filename = "\\Images\\alpha.bmp";int start (){ObjectCreate( 0,filename, OBJ_BITMAP_LABEL, 0, 0, 0 );    ObjectSetString( 0, filename, OBJPROP_BMPFILE, filename );ObjectSetInteger(0,filename,OBJPROP_XDISTANCE,100);   ObjectSetInteger(0,filename...
[Deleted]
When I modify my stop loss of an open order, I get this weird Error number 0 with the error description "no error". My result is a FALSE and I cannot understand why. Here is what I am trying to do: At + 50 pips, update the stop loss price to my trade's open price. I do not know why this would cause...
Hello everyone, I intend to copy my personal trades from MetaTrader 4 to my MetaTrader 5. To achieve this, I have written two codes: The first code is for MQL4 , which saves the necessary trade data in a TXT file whenever I make a trade. The second code is for MQL5 , which reads the file, analyzes
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px '.AppleSystemUIFont'; color: #0e0e0e} p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px '.AppleSystemUIFont'; color: #0e0e0e; min-height: 17.2px} Hello everyone, I’m currently developing an Expert Advisor (EA) that is specifically optimized for
Article URL : https://www.mql5.com/en/articles/2555#invalid_lot I am getting Error 131 To resolve this, I am trying something like Volume Error Handling . It update value automatically. Buy_Lot_Size = MathMax ( SymbolInfoDouble (buy_random_symbol, SYMBOL_VOLUME_MIN ), MathMin (Buy_Lot_Size
hello everyone, in my MT4 latest terminal and even in old terminals i'm unable to find "signal" option to copy someone's signal and in MT5 signal option is visible but not clickable, even i click it from MQL4 website it does not open in both MT4 and MT5 what should i do now, do i need to top up MQL5
Dear coder, I am writing an indicator (checking signal from MACD + MACD of highger timflame) But I could not find the method only add one arrow on the first bar when the signal appear So the chart as image below. Could you please check and give me some advice to revise my code. Thank you so much
Hi, When I launch a second MT4 instance from the same broker, it overlaps the first MT4 instance on the taskbar. How can I prevent this
Can I get some help with my MT4 mobile app. It stopped working two days ago & every time I try to open the app it does nothing at all. I've cleared the data and the cache multiple times and uninstall and install it multiple times and it still doesn't work. I've reboot my phone nothing seems to work
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
This is indicator developed by Agostinho Jorge Oliveira Can someone guide me how to add up magic number function in this EA? I would like to have P/L display filtered by magic number. Regards
where can I download library file:  "Trade.mqh"  for mql4? can I use the mql5 version of that file for mql4? I have that in metatrader5 but no in metatrader4 libraries. Please help.
  TickScalper EA  (778   1 2 3 4 5 ... 77 78)
Hi to all, I'm glad to represent my development TickScalper EA according to ideas described here and here. Especially for this EA I've created some new tick indicators. This new EA has big number of different settings devided on 5 groups: - Main - Timing - Sets for tick or fast MAs - Sets for slow...
I have an Apple MacBook Air M1 with OSX Ventura 13.7.4 (22H420). My MT4 installer is straight from my broker's website, but I also tried using the installer from the MT4 website. Doesn't seem to be any different. I have been using MetaTrader4 for about a year and never had any issues running it in
Is there an indicator or some way to install an offline chart on MT4, that will accurately countdown remaining time on the candle time frame selected? Seems the ones I found, cannot count, for example a M2 time frame, or other non-normal time frame offered by MT4
Hi, I need help please. In the "account history " tab in MT4, when I put the "custom period" it will always relate to the trades closing dates, not the opening dates. Is there anyway I can refer to the trades opening dates rather that the trades closing dates ? Thank you
No errors on back test, works well on live and demo accounts. But whenever I attempt to upload it on the market, it does not pass the automatic validation. Can someone please check my code
Hi, ive tested the my EA on my current broker Vipromarkets and it test okay with no errors. But, when I send it in for automatic validation I get ordersend error 131 and a zero divide error. After looking into the problem this type of error is associated with lot volume. The part of code from my EA...
let's say I have opened many charts of the same symbol on the same MT4 platform, is there a way to show a trade level's entry and its TP and SL on one chart only, then open a new trade from another chart and show its entry level and TP and SL without interfere with the previous trade levels
  EAs' files  (45   1 2 3 4 5)
All the EAs are in this section posted already. Each EA is having the thread. Name of this thread is the same with the name of EA. If you want to find Mandarine EA so you need to find the thread namely "Mandarine". I am posting something here to find it more quickly. But please all the question...