MQL4 and MetaTrader 4 - page 84

I've been connected to this broker server for a couple weeks then last Friday it stopped connecting with the "No Connection" error. The server is online because I can connect to it at work fine. I've done everything I know to do, fresh MT4 install, restart router, check the router isn't
Hello, Struggling here to get the time between to dates: Can you help please? Print ( "Date i=" ,Time[i], " Date ZZ4=" ,Time[ZZt[ 4 ]], " Date Diff=" ,Time[i]-Time[ZZt[ 4 ]]); // => Date i=2021.03.09 17:00:00 Date ZZ4=2021.03.04 18:00:00 Date Diff=1970.01.05 23:00:00 Print ( "Date i=" ,Time[i], "
I am using below code to calculate lot size before opening order, but now I changed to ECN accout that has commission. Is it possible add commission to lot size calculation before order is open on a symbol? double lots    = AccountBalance()*(RiskPercent/100.0)/(StopLoss*pipValue);
Hello, I have a problem whereby I am running the standard "MACD Sample" EA in the optimizer but getting different results than when I "Set input parameters " and do a back-test. Here is some of the background: 1) Environment: MT4 Build 1010, Using MACD Sample EA, Windows 10 2) Spread set to "20"
[Deleted]
string s="\n"+"Bye"+"\n"+"Bye"+"\n";Alert (StringFind(s,"\n",0)," ",StringReplace(s,"\n"," ") ); return: StringFind() --> -1            StringReplace() --> 3
[Deleted]
Hello I need a help how to lock my EA/Script based on my login account number ? example: my login number in my broker is 12345 , and I want my EA/Script can run only inthat login number. also how to lock the EA/Script that can run in one broker only ? (example: my EA/Script can run only in...
Hello, Started yesterday receiving these errors when trying to pay by Mastercard and Paypal: MQL5 VPS: payment error 'Expected identifier, string or number' MQL5 VPS: payment error 'Syntax error' MQL5 VPS: payment error 'Expected ';'' MQL5 VPS: payment error 'Syntax error' Tried several times, never
Hi everyone! I want my EA to be able to recognize when the AutoTrade menu button had been clicked. Any Event handling function for menu items similar to the OnChartEvent() function for chart events? I am aware of the IsTradeAllowed() and TerminalInfoInteger(TERMINAL_TRADE_ALLOWED) They only return
[Deleted]
Hey, I edited a bot to send meta trader trade alerts to discord! The original was a MT5 version was from fxcodebase. I was able to translate it to MT4 completely and compile it, but it's not sending alerts. Could someone help me please
what is the best Delta footprint for Mt4 ???? thank you Jose
Hello, I want to be able to draw a horizontal line between position 0 and position -1. I can do now between position 1 and position 0, thanks to the help in this post: https://www.mql5.com/en/forum/437621 but 0 to -1 doesn't work. I'd thought about using OBJ_HLINE and using the Ray Right function
//+------------------------------------------------------------------+ //| eeex.mq4 | //| Copyright 2022, MetaQuotes Software Corp. | //| https://www.mql5.com |
  All order close  (8)
Hello I want to close all order programmatically with one magic no but not using loop I want to close all order at same time not one by one Please help me if this is possible Thank you in advance
Hello! I am pretty new to MQL and I was wondering how I could make an EA that sends all closed trades to a csv file and keeps updating once new orders are closed. Just trying to make an excel dashboard to show all my stats and help visualize everything. Managed to get live PNL working and balance
Hello, Normally, I use the following code to perform my looping within an indicator: int lookback = 15 ; int limit = Bars - 1 - MathMax (lookback, prev_calculated); for ( int i = limit; i >= 0 && ! IsStopped (); --i) { // my code } return rates_total-1; However, I want to
It's always tiring to hover mouse cursor over strings of points to locate close price. Wouldn't it be cool if MetaTrader ploted small dots at close price? Well, no need to wait for MT5 for such feature. Download yourself CloseDots indicator and plot it on any chart. Line Chart Line Chart with...
When drew trend line by --> ObjectCreate("Trendline",OBJ_TREND,0,Time1,Price1,Time2,Price2) . What function use to get degree ? thank you
if ( OrderSelect ( OrdersTotal (),SELECT_BY_POS,MODE_TRADES)) // if(OrderSymbol()==Symbol()) { // if(OrderType()==OP_BUY) { // if( EQUALITY_TOLERANCE > (Bid == OrderStopLoss())) //&& C1>C2) {
Here is an image, the button should be down on the right https://www.mql5.com/en/charts/16879879/us2000-z22-h1-fxpro-financial-services
Dear masters, I have 2 separate MT4 installation, one on a low end PC running ubuntu, and one on high end PC running LXDE. The low end ubuntu one is running flawlessly, although limited resources, strange thing is the MT4 installation on high end PC is almost non responsive. My guess the MT4
';' - open parenthesis expected Line 50 Column 46 //property strict #define BUTTON_NAME "Button" extern double PartialClosePips = 20 ; extern double LotSize = 0.01 ; double pips = Point ; extern int PipsToLockIn= 1 ; extern bool UseMoveToBreakeven= true ; int OnInit () { ObjectCreate ( 0
Hello, I'm using this code to try and draw a horizontal line between two adjacent candles. int i = 100 ; double prediction = 141.550 ; ResetLastError (); // prediction-100 here is a test, normally it should be just prediction to get a horizontal line but in order to show //
Hi All, I hope somebody out there can help me. I want to add the date and time to my csv file handle, so that my filename will be something like 2022.12.08 10:40 Result.csv If I do this:- string _filename=TimeToStr( TimeLocal (), TIME_DATE | TIME_MINUTES )+ " Result.csv" ; Alert ( "_filetname is "
Hi, So for example OBJ_TEXT set with coordinates of price/time Anchor set to ANCHOR_LOWER My code works as I expect but sometimes OBJ_TEXT goes outside of the chart window. This is because price is either high or low on the chart and objects are anchored as UPPER or LOWER so this makes them off the
  EA Optimization  (1)
Hi All, Downloaded an EA ( EasyRobot ) sometime back, have been trying to optimize the bot but to avail. Can anyone help with advice. attached is the code: //+------------------------------------------------------------------+ //| EasyRobot.mq4 |
Hey everyone. I hope everybody is doing well, this is my first post here. I have been using an indicator on MT4 but there’s part of it that I really want to remove as to free up some screen space. I know that there are certain menus that you can change the preferences of, but I just can’t find this
My broker only provides history for some past period. But scrolling MetaTrader allows me to go past that, including moving averages. How can MT show data and plot a chart including moving averages of history data that is not available? Let's say the broker lets me download data from September but
HI, int orderSend = OrderSend ( Symbol (), OP_BUYSTOP, lotSize, Ask+OpenBuySellStop* _Point , Slippage,Bid-FixedSL* _Point , Bid+FixedTP* _Point , comment, MagicNumber, TimeCurrent ()+ 60 * 45 ); FixedSL = 300 points FixedTP = 1000 points I got BUY STOP: Price: 1.05837 SL: 1.04998 TP: 1.6298 So SL
Hello everyone! Why do I keep receiving not more that 30 notifications from my EA at a go, even when the loop is meant to send up to 60 notifications. Is there a limit to the number of notifications to send from buffer? Does same go for emails? Hope can this limit be increased