MQL4 and MetaTrader 4 - page 134

Please tell me what is wrong with my code on the snippet below, after compiling there is a warning that says I 'OrderSelect' and 'OrderClose' should be checked and when I execute the EA on my chart, it does not close at the specified points. void CloseBuyPositions() { for(int i=OrdersTotal()-1;
Hello, I have installed MT4 on my VPS ( not the mql5 VPS) and tried to login to mql5 community. Although my credentials were correct, It fails and gave me this message 2020.05.08 Signal: '230701219': failed get list of signals, connection error 2020.05.08 Signal: '230701219': failed get list of
i have tried all i can just to grab data from this custom indicator, its "<Deleted>" and i want its value to be use in my EA by getting the buffer, but i dont know wether its because of the parameter or other cause, i have successfully get buffer from other custom indicator, but this one is not.. i
Hi, I'm new, but learning lots I have searched, but none of the solutions worked for me. Here is what I wrote for it, but the result sometimes results in not enough money? Any specific flaw in my logic? I realize I am not including a risk here, but just want to make sure I am on the right track
Hi there, I'm stuck with this thing. The idea is to generate an arrow object at current candle OpenPrice, when previous candle Open & Close is completely outside the range of 2stdv. The code works once, but wont work "every Tick". Thank you! extern int BBPeriod = 20; extern double BBDeviation =
I'm new to forex trading but have a background in programming. I have a strategy that has been working reasonable for me but it involves a lot of staring at the screen waiting for just the right time to open a position. I'm working on an EA to automate this but I need to get the values of D+ &D-...
Hey all, I'm currently working on a custom Hull moving average (HMA) indicator that detects and labels local minimum and maximum points of the Hull curve. At first glance, this modified indicator seems to work well (see images below), tagging HMA minimum points with a green buy signal arrow and HMA
Hi I know I should go to freelance for this but I'm looking for an ea that opens orders once a trailing appear. Example lets say trailing opens up after 10 pips (100pts) and as the price go forward so does the trailing step. Now when price goes on reverse and hit the trailing price it opens another
Hi everyone A few days ago I added a topic to understand why my indicator repaints . William Roeder said that my main loop is wrong, so I followed his method but still the indicator was repainting. The reason why I added a new topic was I think now the question is totally different. So, I removed
Hello everyone, I've been using MT4 on MAC and Windows for several years now. It runs well on both OS's, but since the MAC version is actually a virualized PC application through Wine, it has a couple of limitations compared to the pure Windows app. For example, on MAC you will not be able to access...
I am using the same code with two brokers, one broker things are working fine, but with other brokers, it places 2 or 3 orders and then this error comes up Order send error 2 This is the function i use for defining lots , Ordersend, can any one figure it out please double GetLots() { if
input string ="a,b,c,d"; I want to know how to separate by comma, strings and print them. For example, I want to make output using Print like,,,, My name is a. I like b. Do you know c? I hate c.
double   faster = iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,1), //MODE_MAIN            slower = iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,1), //MODE_SIGNAL            faster_2 = iMACD(NULL,PERIOD_H4,12,26,9,PRICE_CLOSE,MODE_MAIN,1), //MODE_MAIN            slower_2 = iMACD(NULL,PERIOD_H4,12,26,9...
Hello Example: If I want my EA to Find the second last fractal up, that was above Moving Average 100 And compare it to the last fractal up, thats above Moving Average 100 If the last fractal up is lower then the second last = SELL I think i got this right, But i need help putting in the Moving
I am trying to draw 4 horizontal line calculated using a MA but when i run this code, it draw the lines but dosnt update them What should i do? int start() {//---- BURADA EMA'YA GORE +-30 ve +-300 RANGE'leri çiziyor. double x; x =iMA(NULL,0,EMA,0,MODE_EMA,PRICE_CLOSE,0);
Hello, I have the following if statement in a for loop of my EA that runs 24 times every 1 minute bar because I want 1 minute data for 24 pairs. If I take out the iRSI function call, the speed improved drastically. Is there a different way of calling the iRSI function, or any other function to make
Hello everyone, i've been having an issue with this function: what i'm basically trying to do is placing a stop loss on the opposite bollinger band when the OnTimer event occurs. The function works perfectly, except for the fact that the stop loss is placed on the wrong instrument when multiple
Hi everyone, I am new to MT4/MQL4 and also to this community, so many thanks in advance for tolerating my newbie questions. I am trying to build a trade breakout EA that uses Point and Figure (P&F) chart patterns as input into trades. I am wondering if anyone here has any advice as to how this could
[Deleted]
  login to an account using EA  (24   1 2 3)
Can I use an EA to auto-login different accounts? if i have sereral different accounts,and i want to trade with all ofthem,can i first login with one account,send orders,then login withanother account and send the same orders?
Don't want rent a VPS, use local machine to run EA. However the local network is not stable and might get disconnected (sometimes it lasts forever until take human action). I want to ensure that when network is disconnected and lasts for given threshold then send notification to mobile (which should
  Error CryptDecode  (27   1 2 3)
Hi, just trying the new CryptEncode and CryptDecode functions. Everything is working as expected with CryptEncode. However when using the provided example with a slight modification (converting the char array into a string and back to a char array). I am getting the 4029 error....
I tried to download the MT4 setup from this link https://www.metatrader4.com/ But every time it downloads the MT5 setup. Setup file name is also mt4setup but after the installing it's MT5. Can anyone explain this
Hi, Im a newbie trying some simple programming.. Hope some kind souls can pardon my ignorance and give some advise.. Trying to plot a line that is a sum of 2 SMA output.. Tried using the code below.. can anyone advise how to rectify? thanks! #property indicator_chart_window#property
I wanted an EA that will contually make a profit whether its an uptrend or a downtrend and to make the profit whether the candle is bullish or bearish. Now the problem is as soon as a candle opens on order opens as well depending on whether its a sell or buy and with each new order comes the
Hello traders I am new to MT4 and this forum. Having problem with Detailed Report GIF chart, which is inserted into the actual report. The chart has the horizontal and vertical axis cropped, so it's difficult to see the corresponding values. I have generated the Detailed Reports as an Excel, HTML
Hello I have a very simple EA with an alert only. Here is the code: void OnTick() {//--- //Test if (Close[1] < Open[1] || Close[1] > Open[1]) //Test { Alert("Test"); PlaySound("email"); } } This code is just to test the Alert and Playsound
  MT4 MACD issues  (4)
The MACD in MT4 draws the signal line as a histogram - why when the the rest of the world draw 2 lines is beyond me. Also, the signal line is computed from an SMA not an EMA. Anyway, I downloaded Traditional MACD that corrected these problems - only to discover that when I call iMACD() there is a
No news feed even enable news button checked . Just downloaded mt4 for pc windows10 3 days ago, nothing altered, terminal shows news column but always blank. Please help
[Deleted]
hi can someone help me modify an EA im using. It deletes all objects when i change time frames or adjust the settings. I cant code so i need someone to modify the code and delete the "deleteallobjects()" part of the code/ <ex4 file deleted >
Hi everyone, I have a problem with MT4 installed on MacBook Pro. Windows are freezing because they are created outside the margin of my second screen. Any help? Attached some picts of problem