MQL4 and MetaTrader 4 - page 79

Hi, I remember reading about this subject in the documentation but can't seem to find this subject anywhere now. The reason I ask is because I get error 4200 for ObjectCreate of almost the same exact object. Wondering of there is a limit etc. //----------------------B19 string name19= "B19" ; if
Everytime I use ErrorDescription function like here below I receive "Error: ERR_NO no error" message. Instead of error description I get stupid "no error" text. No matter what error number is, always the same "no error" text. What am I doing wrong? Anyone could help? Print("Error : ", GetLastError()...
Hello, I am new to MQL4 programming language and I am trying to write the SuperTrend indicator in Tradingview in mql4. My problem is that when I use the #properties strict code, my program does not work, but when I delete this code, the program runs smoothly. What do you think I should change in my
Hi All, The problem I encounter when drop my EA on USD/JPY & XAU/USD (2 symbols). On the USD/JPY it displays the stoploss of XAU/USD & then as price change's it displays the original stoploss (when trailing), so on & so forth. My code below, I tried changing a few things but no luck & my order magic
[Deleted]
Hi all, simple question: is it possible to set the position of object - whether it is in front of the chart or behind the chart - for each object separately? I know that the chart option "chart on foreground" exists, but that sets all objects to the background. Could the answer to my question be the...
Hi, on mt4 it is possible to combine two indicators in the same window, for example the moving average on the standard deviation. But how is it possible, by programming, to compare the position of these two indicators with each other? For example if the moving average is above the standard
hello guys i need help I was checking and testing the market, but I need a special indicator. I need 20,000 Tenkan_sen in one indicator. The periods are from 1 to 20,000. I know how to make an indicator as a beginner, but in mql4 it supports up to 512 buffers. On the other hand, if I want to program
Hello, i am trying to code when my ea creates a order and if that candle closes opposite way of signal, i want to close order before it reaches its stoploss. PS: if iClose-iOpen>0 it will be bullish candle, if <0 it will be bearish candle So i need to get info when trade candle closes. Do you
Dear All, Does anyone have a script (EA) that export automatically historical data (1hour, 4 hours, 1 day)? Thank you, Robert
  Larger fonts in MT4  (24   1 2 3)
My vision is getting even worse and I'm only just barely able to use MT4 with considerable difficulty now. I have the windows systems fonts etc enlarged, but it doesn't affect the MT4 client fonts. Is there anyway that I can (easily) make the fonts in MT4 larger as there is in the Editor? Thanks
  Drawing the straight line  (12   1 2)
Hello, I need some help with lines on the charts. Lets say, I found high of the day, or whatever, markered a support or resistance level from H or L of this Candle. Then, is it possible to set kind of loop which allow this support/resistance line/area to extend pararel with every bar which appears
if some one can help me out with this i'm trying to draw an histogram like this & so far without succes legend: green = above 0 & above signal blue = above 0 but below signal orange = below 0 but above signal red = below 0 & below signal...
I seemed to have coded myself in a corner. ObjectSet( "B23" ,OBJPROP_TIME1,ctime); ObjectSet( "B23" ,OBJPROP_PRICE1,C); This OBJ_TEXT will mark a fractal either low or high as my condition instructs it to do. If I delete the object when my condition becomes false then I'm
Hi guys and all respected coder, I am not a coder but i try create EA using forex advisor (attached), Please anyone can help me to testing of EA and posting here for result, because i was tested but not maximize Thanks
When I want to divide the elements of two arrays that I defined as double, it does not show anything on the screen. What is the reason for this ? I tried to write a simple code below and indicated the problematic place with the '//' part next to the vCMO variable. Please help me, I want to plot the
  mt4 catd  (1)
Please what does && and + mean when adding combining indicators to make an EA
Hi, I’m looking for any suggestion about this specific code. This is the original code to check the result of the last closed order. void CheckLastOrderResult() { double profit = 0 ; int orderId = - 1 ; datetime lastCloseTime = 0 ; int cnt = OrdersHistoryTotal(); for ( int i= 0 ;
Hi @ all! I need some help please, with this RealCloud indicator code. It prints Magenta and Aqua colored bars in the chart. I want to use it for an EA. But it gives no values in the data window. So my EA can not read anything. I need an value >0 when it is Aqua, and an value <0 when it is Magenta
Hello everyone, I would appreciate your help since I am not so familiar with mql4. Thank you in advance. My goal: To show the message "CHECK" somewhere when testing in the strategy tester . I run the code several times in several time frames and markets. Nevertheless, the message was not shown in
The picture below I want to avoid commissions being greater than profits (Loss). I'd like it to be the other way around when trailing, problem is I don't know if this is the correct way to do so with the trailing function below. 2. Could be that I'm not calculating spread with commissions or spread
hello friend , I need help , i make button that open order , the problem is when click on , the order is open and when click off the order open again . how can i prevent it , i want only open in click on , click off is initial state. int OnInit () { createButton( "button1" , clrOrange , clrOrange
Is there a way to allow webrequest to work even with invalid certificate? The reason is I generated the certificate on my own, and upon visiting the website my browser will show a warning saying certificate is not valid. I believe this is why webrequest don't work as well
Hi everyone, Just a quick one. I have two accounts, one I personally trade and one that is a mirror account. I am interested in helping my contacts setup a broker account and then mirror my mirror account. Is this even possible? There must be a way surely? I'm not interested in Affiliate programs
i try to make button on off , that mean when click button ,it change color different before click ,how can do void createButton( string bName, color bgClr, color bClr, color tClr, int width, int height, int x, int y, string text){ ObjectCreate ( 0 ,bName, OBJ_BUTTON , 0 , 0 , 0 );
Hi everyone! I am new to coding in MQL and was looking to use iMACD and iMA conditions for my indicator. I want to compare the iMACD and iMA of current chart's symbol with the iMACD and iMA two different symbols. Below is the simple condition for the current chart symbol: double BC1 = iMACD ( NULL
please help me out here: I want to say if Equity greater than start blance +200 close all tades for the day //+------------------------------------------------------------------+ //| DMF Real.mq4 | //| Copyright 2021, ITace Inc
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"