MQL4 and MetaTrader 4 - page 27

To post a new topic, please log in or register
Hello, I'm trying to get an EA to run off of buffers from a custom indicator. The indicator creates arrows indicating long and short, and closes the trades with arrows indicating close. The SL is drawn on the chart with a buffer as well. I want the EA to open trades when a buy/sell arrow is printed...
Hi guys, I just used CHARTEVENT_KEYDOWN this way: if (lparam=="A")... Is it somehow possible to check if SHIFT and A are pressed? I didn't find anything about it in the MQL4 docs.
Hi, Does anyone know if it is possible to pull prices from tradingview into an array on MT4 using mql4 ? I know there is a WebRequest function in mql4 but not sure if that would be able to do things such as above ? Thanks :)
TimeHour function not defined ??? how to fix it ?  Help me guys on macbook pro
This is the error I got when I running the EA. But some mt4 apps runs the EA perfect. But Exness broker mt4 gives this error to me. Anyone can help me to fix this. 
I have many custom indicators, templates, etc, is there a way to install these custom stuff into a separate library from the installation libraries? The problem is that if I need to perform another installation of MT4, I need to find out what needs to be copied over.
Hello, I am facing an issue lately with opening or installing MetaTrader 4 from any broker to my laptop with the latest windows update. any suggestions? when installing message appear <<Sorry, something went wrong: try again later! >> and when trying to open a message pops up saying that the...
Hello Im quite new to MT4 coding. Ive written a couple of indicators but I find that despite trying different commands (ObjectDelete, ObjectsDeleteAll, ObjectsRedraw) in the init section of the code I cannot get my drawn objects to be redrawn unless I switch from one timeframe to another eg 5M to...
An EA is master pieces of the author and copyrighted, must be great if MQ4 Vendor can make automatically generated some code to make all compiled EA is can not decompile by hacker or by everyone except MQ4 vendor. if anybody agree please reply this thread, or if do not like reply with reason too....
Hi, I have a label object with an OBJPROP_CORNER=CORNER_RIGHT_UPPER. The label shows a dynamic value, so the the width of the label is also dynamic. Because of the upper right corner the label widens to the left side. Question: How can I get the left x-coordinate (means the end to the left) of that...
Hi, I changed my trading server for my signal providing trading account and now I can't put it back for sale. Error message: Authorization failed. Please check trading account data.  Keeps appearing whenever I try to make a change to it. Login, investor password and server are all good to go so I...
Hello everyone, How can i solve the problem of error 130 & 129 here:ticket=OrderSend("NZDCHF",OP_BUY,1.0,Open[0],0,Low[0]-200*Point,High[0]+200*Point,NULL,0,0,Green);
I have been succsessfully using the mt4 platforms on my desktop and iphone for over 18 months. Last week a notice to update came on the desktop screen. I wasn't able to perform the update at that time and can't get the update option to show back up on the screen. My desktop mt4 platform stopped...
Anyone know why I'm getting this error when testing XAUUSD? 2019.07.17 13:44:20.671    2019.06.28 23:54:59  MACD Lite XAUUSD,M1: unknown symbol name EURUSD for OrderSend function
Hey guys, to be honest, i'm really disappointed of the latest MT4 software. I just can't belive that the mega bug with the trendline ( moving from timeframe to timeframe ) which had been discussed several times on almost every forum i know, is still there. I just don't get it. It's such a pain to...
#property indicator_chart_window#property indicator_buffers 6#property indicator_color1 RoyalBlue#property indicator_color2 Red#property indicator_color3 RoyalBlue#property indicator_color4 Red#property indicator_color5 RoyalBlue#property indicator_color6 Red//---- input parametersextern...
  Extern bool (6)
Dear All when I change my variable (Money_management) to true or false, by launching my program, I do not get the desired result. indeed if I leave by default in my program at FALSE, and I change my variable at launch, this is not taken into account. I can't find my mistake. can you please help me?...
Hi, can someone help how to to teach an ea when xxx amount  of open orders reached than do not open trades for the rest of the day and start on next day. I am counting my openorders right now like this double Open_Orders_Profit(){   double openordersprofit = 0;   RefreshRates();   int...
Hi, This is notice that if you try to use CiMACD in MQL4 you will not always get the correct result. The reason is that in class method GetData you have the following line: return(iMACD(m_symbol,m_period,m_fast_ema_period,m_slow_ema_period,m_signal_period,buffer_num,m_applied,index)); Look at the...
I have been using the MetaTrader 4 app on my android for over a month, worked great for what I was using it for. One morning, I logged in around 7:00 am, worked fine. Tried logging in later that morning around 10:00 am and I got the error, Authorization Failed. I contacted the broker to see if...
It would be stunning add this functionto MT4, meanwhile how Can I achieve this sort of thing in MT4. What I really need is overlay to different indicators (BB and RSI) in the same sub window from code. Thanks.
Hi, with the function ChartGetInteger function and the property GET_WIDTH_IN_PIXELS I find out the width e.g. respectivly the height of the chart. Unfortunatly that doesnt work when I tile the window. Let's say I have 2 chart windows tiled in different size and want to know width and height in pixel...
if(Total_sell_pos() == 0 && Total_buy_pos() == 0) {      double previous_balance = AccountBalance(); //usd1000}if (AccountEquity() > previous_balance + (previous_balance *0.05)){ //usd1000 + 50 = usd1050      CloseSellOrders();      CloseBuyOrders();      Delete_Pendings();} if Equity more than...
In my EA I open 2 orders at once.  Order #1 : set TakeProfit value ( TakeProfit value calculated based on ATR of the time of order placed ) Order #2 : do not set TakeProfit value at the opening Later on I want to run trailing stop for the "Order #2" and I need to pass the TakeProfit value I used in...
Hello everyone, I'm trying to make an expert with the CCFp for currency strength, the problem is that when i make the expert from thr indicator, it doesn't report the data so every variable in the code is equal to 0. How can I solve it?
Hello Everyone, I'm trying to make a screener in which i'd like to draw a minichart in a little box under datas,what functions can i use?
I have found an script for swap that does what i want (show the swap rate on long/short and colours them either green for a positive number or red for a negative number.) What i would liek to be able to do is change it to an indicator so i can use it with an ea builder.
Hello, I coded an custom indicator which is already on the chart and working. I also coded a button (contains to that indicator) which should open the indicators properties when I click on that button. The button itself works fine (I tested him with Print()). I only need to know the function, method...
This is part of my code //|                                                           GumRai |//|                                        http://www.metaquotes.net |//+------------------------------------------------------------------+#property copyright "GumRai"#property link      "http://www...
I tried to automate it but I got wrong entries even I detect the right numbers of each trend of the indicator . any idea about wrong entries ? or how to detect the signals ? this is a part of my code  if( redd!=EMPTY_VALUE && orderscnt (OP_SELL)==0){        if(TakeProfite...