MQL4 and MetaTrader 4 - page 70

MT4 build 1353. AccountFreeMarginCheck() is not reliable, sometimes it returns strange value GREATER then the current freemargin (resulting in a negative margin). I have also seen positive margin but completely incorrect (0.12 instead of 217 for example). For example on my broker (running on all 28
can some one tell me how can to stop modification evry miliscond for exemple if i open trade .. EA should stop to modify trade every miliscond what function i should use it
Hi guys? Iam sorry my MT4 Evaluation Terminal takes me to MT5. Please how should I resolve the below technical errors? The EA has no errors but it is not trading.I shall appreciate if you would advise me on how to fix the technical errors.Below are the images of some of the results that I am getting
Hi, I am trying to partially close some orders (2 or more) in a way that I can get some desired profit out of the trade...let me better explain with an example: Say that I have 2 (or more BUY orders) ongoing, say that all orders are in profit of, for example 567$, and my risk is 100$, with this, we
As the question describes, let us assume that we have an index corresponding to a higher time frame candle. Now, I am interested in getting the range of indices of all candles which are included in that specific candle. To make things clear, let me give an example. Let us say that I have the index
  MqlRates Struct  (10)
Hello! Why would I need to use MqlRates struct? Instead of Rates.high(1)… to get the high of candle 1… I can Use iHigh() or High[]… any reason for that? Thanks
Hi when i uploaded my EA to market place it gave me errors after checking error type "Invalid volumes in trade operations" although my ea working well in live market and backtest what is problem here? please, Rewrite these codes again and make the necessary modifications, taking into account this
Hi All I have an EA works on the last bar completed events, as described in this article: https://www.mql5.com/en/articles/1511. So I would like to test it with Open Prices Only (OPO) method. In the two pictures here, If EA places a BUYSTOP at the end of the first bar with predefined SL and TP, now...
Hello! I'm new here. I have this code, where I receive a signal from an indicator and based on it I open operations. but here it opens operations as soon as I connect it, and also opens infinite operations. double Lots = 0.01 ; double TakeProfit = 600 ; double StopLoss = 200 ; input int
Hi there? This MACD sample EA has no errors but it is not functioning.Please what could be the error? Error Results: EURUSD Currency ininitialized,etc.Please how can I make it functional?Thanks!!!! //+------------------------------------------------------------------+ //|
Anyone know how to fix this? Every time I try to open MT4, it quickly pops up a window, then quickly disappears and closes. I have tried restarting computer, redownloading MT4, and searching on the internet but nothing seems to work. Thanks
  vertical lines  (5)
hi these codes draw verticale lines (where  datetime t and string p are known) ObjectCreate(0, p, OBJ_VLINE, 0, t, 0);ObjectSetInteger(0, p, OBJPROP_COLOR, clrYellow);ObjectSetInteger(0, p, OBJPROP_STYLE, STYLE_SOLID);ObjectSetInteger(0, p, OBJPROP_SELECTABLE, false); Here are the lines drawn  I...
Why is symbol change and timeframe change both bunched up in REASON_CHARTCHANGE? One may require a lot of extra processing time and the other typically should not. Please create new constants to distinguish the two. Regards, JT
Hello team, I'm having issues finding symbols. Im running this app on android and the symbols cannot be found. I have 2 friends who started trading the same day as me and they are on iPhone and they have the symbols on their phones. Any help fixing this issue will be great
Hello Gents/Moderators Is there a way i can change my profile name as it were (Ghost Trader) after registering as a seller ? I would like to remain anonymous. Thank you
Hello experts, I need your advise to understand why OnCalculate doesnt work in my EA. I have the following compilation warning " OnCalculate function declared with wrong type or/and parameters" and the print statements always return 0 when EA is running. 2023.02.08 15:10:22.523 TestOnCalculate
i have some times this message (order modify error 130) and even i use big stoploss input string EaName = "ATLAS" ; double priceNew1 ; extern double lot = 0.01 ; extern double TP = 0 ; extern double SL = 0 ; extern int MagicNumber1 = 1917 ; double MyPoint,sl,tp ; int Ticket,Decimal; color N =
i use ( bollinger bands) for modify SellStop .. and all time i have in the journal (OrderModify Error 1) some one can help me plz to slove it //+------------------------------------------------------------------+ //| ProjectName | //|
Hi I want to include a MA on the RSI into my ea without calling an custum indicator. Is it possible to calculate the MA right in the expert advisor instead of calculation it in the indicator? In the ea I want to include a check if MAonRSI crosses Value of RSI like this: bool FilterRSIMACrossShort()
Is there any possible to create an EA to close all the positions no matter profit or loss on every end of the month or 1st day of the month? Please help
Morning all I have an EA with an `include.mqh` file attached, all working as expected, however I getting the `macro redefinition` warning when compiling the EA. The include file is as follows; #define __SLEEP_AFTER_EXECUTION_FAIL 4 00 void <fuction>{ if (<variable>){
I want to open a 2nd trade (if its in profit or a loss within 5 pips), when I execute my 1st trade I would like to open another order. The code below will open when it hits the TP Which is incorrect, please help if you know the problem. bool OpenTradeInProfitOrLoss() { bool Trade= false ; for (
I tried to find a solution, but I couldn't find anything about it anywhere. My indicator doesn't give me any information on buffer, only shows me arrows. Is it possible to read the arrow to an EA without any buffer signal? TIA
Hi, I am trying to calculate the highest price and lowest price in the bar range from the bar at which 1st order was opened till the bar at which 'x' order was opened. but i dont know where am i am going wrong. The code seems to be refreshing the highest and lowest prices as new bars open up even
Hey guys, have been working on a simple EMA crossover indicator and was assisted by Keith some time back. Recently I tried to edit the signal arrow to occur on the current candle and not after it is closed. Can anyone please help out
Hi Experts, i need help. i want my ea to stop trade on friday. I use the dayofweek function. below is my code, int dayOfWeek = DayOfWeek(TimeCurrent()); if (dayOfWeek == 5) // 5 is for Friday { return (0); } But the mql compiler stated error message "DayOfWeek' - wrong parameters
Hi, I just want to ask for your useful idea. If flag becomes true, I just want to count 30sec, After 30sec, then I want to delete object. I tried to use Sleep(30000), but this sleep time stop other program in EA, so I don't want to use it. Do you have any good idea ? bool flag; If (some event
Hi all, I need an help to find orders closed during the current week, something like TimeWeek(OrderClosedTime())==Current_Week How can I write "TimeWeek" and "Current_Week"? Thank you
How to find the number of open positions with MQL4
  for loop issue  (2)
Hi everyone. in this simple loop, several support lines are drawn.. the problem is: multiple lines are at the same value. how to make sure that the lines are at different values and they are not repeating the same ones? see example code below. thanks and good day:) void HLcalculation() { for (