MQL4 and MetaTrader 4 - page 364

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 Total=
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
[Deleted]
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...
  ChartIndicatorAdd() in MT4  (19   1 2)
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...
  Expert Problem  (4)
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?
  Charts Problem  (1)
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.
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...
  One more average ...  (511   1 2 3 4 5 ... 51 52)
The usual story goes something like this : which is the best moving average? Everyone that ever started to do any kind of technical analysis was pulled into this "game". Comparing, testing, looking for new ones, testing ... ______________________________ The idea of this one is simple : it should...
Hi, I am new by MQL4. These days I read the tutorial from "https://book.mql4.com/samples/expert". On this side at the end there is an EA called "tradingexpert.mq4". But as I try this in MT4 for automated trading , I doesn't work. The EA seems can not be started. Maybe has someone experience? Many
i searched very hard for this issue i want to count total lost orders in order history and total profit orders in the closed orders not open orders .... after i searched i found this code but seems doesnt work dont know what's wrong with it int TotalLostOrders() {  int TotalLost;  for(int...
Hi, I have been looking in market place and on the forum,  Does anyone know of a MT4 EA or Application that only manages StopLoss? It can be a fixed StopLoss, nothing fancy. I have a EA running and it doesn't have a setting for StopLoss. Would love to load a EA on another chart just to manage the...
Hello, The EA what i need must use different indicator settings from a custom indicator. a freelencer coded a ea for me but we see that this isnt work.. the wirtten EA have as input the settings for the custom indicator but the setted values isnt useable. The signals are Arrows (Custom indicator)...
I have created a simple MT4 EA that writes the datetime/open/high/low/close values for the GbpUsd to a text file. The values that MT4 is returning are not accurate. The last record I received is at the bottom of this post. It shows 1.2462 as the current price but the low for the entire day so far is
Hi everyone. I'm developing an EA and sometimes I get an error 4027 ("too many formatters in the format  function") when I try to modify the order SL. The error does not always occur: sometimes it works, sometimes it doesn't and I don't understand the problem. Here is the code I use:...
I'm trying to get values on lines of an OBJ_CHANNEL created on chart. As far as I understand it, I would be able to get them with ObjectGetValueByTime  However, I'm nor figuring how to...  This is what I'm using for ...   Upper = ObjectGetValueByTime(0,trend,i1,0);   Lower = ObjectGetValueByTime(0...
Hi If I use iCustom like bellow to save 4 buffers, it run the indicator 4 time for each buffer and waste CPU and resources. I'm right?!   Buffer[i]=iCustom(NULL,0,"CustomIndi",1,i);   Buffer[i]=iCustom(NULL,0,"CustomIndi",2,i);   Buffer[i]=iCustom(NULL,0,"CustomIndi",3,i);...
I am a website developer, the client gave me 30 investors mt4 accounts login detail, then I need to display those mt4 account balance, profit, loss onto website. So each member login to the website can see the balance, profit, loss. Do I have to install 30 mt4 folder onto windows VPS, then write a...
  Help with 1 trade per candle  (16   1 2)
I need help in adding code to my EA only to execute once per Candle and not per tick. Acn someone please assist with the code and where to add it please? // ------------------------------------------------------------------------------------------------// EXTERN VARS//...
Hello, I have been searching for an answer for my question all over the web, but I didn't have any luck. I have a simple indicator that takes an indicator called by iCustom and displays if it is in uptrend or downtrend in a 0/1 histogram. The code works well when placed on the chart and when I...
How to close/open  trade using time..... Please give any hint or references.... int bars = iBars(_Symbol, PERIOD_CURRENT); for (int i=0; i<bars && i<20; i++) { }
Hello everyone, I have a function that checks my percentage of daily profit. The target profit is 1%, when I took a test by the strategy tester in mt4  with 10 thousand, in the first operation I had a profit of 100.14: 1 2019.01.07 03:50 sell 1 16.69 1.14214 1.14315 1.14208 0.00 10000.00 2 2019.01...
Hi Guys,  I came across the attached indicator and was hopping if anyone could help add the higher high lower high and lower low, lower high rule text to the chart.  Many Thanks
instead of Bid I want to put Dailyopen ObjectCreate(LineName, OBJ_HLINE, 0, 0, Bid - pipDistance*Point); in below "daily open" indicator code i have put horizontal lines code but instead of Bid price i want horizontal lines on daily open. try to edit but compile error. Any Help Highly appreciated...
Please also add the weekday (Mon, Tue, ...) information in the status bar when moving the mouse above prices
Dear MQL4 coders, please fix 2 error warnings in the below code #property indicator_chart_window #property indicator_buffers 5 #property indicator_color1 OrangeRed #property indicator_color2 MediumPurple #property indicator_color3 Red #property indicator_color4 Black #property indicator_color5 Black...
I have attached a indicator WeisWave3,  it showing coding Warning "Possible loss of data due to type conversion" please fix it up.