MQL4 and MetaTrader 4 - page 102

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
string query = StringConcatenate ("symbol=BTCUSDT&isIsolated=TRUE&timestamp=",( long ) TimeGMT ()* 1000 , "&signature=", signature); string script = StringConcatenate ("sapi/v1/margin/openOrders?", query, "&signature=", signature); string host = "api.binance.com"; string header =
how do i open ex.4 source code
Hi, Does MT4 have the ability for us to "save" our TP and SLs so that if I click buy or sell, the MT4 will automatically set my pre-saved SL and TP without me having to manually drag the lines? My style of scalping is quite fast, so it would be helpful. If not, is there a free EA out there that does...
  Low and High indicator  (32   1 2 3 4)
Hello I am looking an indicator what will show highs and lows of 1 hour. I have some decent results on trading based on highs and lows.
i keep getting errors with this but i follow the videos to a t. need some help with this. also when i download mt4 i get mt5 on my laptop. how do i fix this and how do i fix the errors when i create my ea
Hello! Is it any other method to detect when pending order is activating? Other then loop through all orders and search by OrderType() ? For example a have 5 pendings open, and when one of them activates, I want to trigger other actions. Thanks
char post[], result[]; string str; int res = WebRequest ( "GET" , "https://api.binance.com/api/v3/klines?symbol=BTCUSDT&interval=1m&limit=1" , "Content-Type:application/json" , 0 ,post,result,str); string stringData = CharArrayToString (result); string sep= "," ;
char post[], result[]; string str; int res = WebRequest ( "GET" , "https://api.binance.com/api/v3/klines?symbol=BTCUSDT&interval=1m&limit=6" , "Content-Type:application/json" , 0 ,post,result,str); if (res != 200 ) { Print (res + "," + GetLastError ()); } else {
[Deleted]
I've got an EA that runs on many currency pairs/charts, and sometimes 2 or more charts will trigger trades at nearly the exact same time. I have filters in place that is supposed to prevent too many charts from having open trades at the same time, but this can be bypassed when trades are opened at...
Hi Metaquotes, We started having problems with the broker servers search in MT4 today. From testing it seems to be happening on Windows 2012 R2 VPS only? I have tested Windows 2019 VPS by comparison and it works and does not have same issue. Windows 2012 end of life is not for 1yr more with EOL on
how to update mt mt4 platform to get updated indicators eg ma colour change etc
would it be possible to use https://www.mql5.com/en/docs/basis/preprosessor/conditional_compilation #ifdef, #include, etc. to have one codebase for both mq4 and mq5 variants of an EA? the main logic is the same but might call different order functions and other such functions which are different in
Hi, why in the following code does OrdersTotal() not always return an order? void OnTick () { // Timer int hour = Hour(); int timehour = 10 ; // Buy Switch static bool buySwitch= false ; // Adjust Lot Size double lotSize=LotSize; // Current order counts int buyCount = 0
Is there a way to capture the high/lows of an indicator value during the formation of a new bar similar to what we already available for prices: High[0], Low[0] ? I wonder if there is some function already for it on MT4. I am not talking about high/lows of the price, I am talking about high/lows of