Download MetaTrader 5

MQL4 and MetaTrader 4 - page 85

To post a new topic, please log in or register
Hi,  my ea occur warings. 'check operator precedence for possible error; use parentheses to clarify precedence' how to fix?  <Decompiled code removed>
Hi EveryBody ,, i have a a problem with my simple expert advisor which gives Alert with some conditions as shown in code below ,, but the Alert works when every tick ,, how can i stop it ?? Thanks in advance //+------------------------------------------------------------------+//| Expert...
Hi Everyone I have two related questions: Question 1. I have tried a number of different ways to limit my EA from running on every tick for certain void functions, but have not had any success.  Some of my void functions only need to get executed when the new candle/bar forms, so it's not necessary...
Trying to get a buffer to start from 0, as opposed to the calculated amount.  Below is a simplistic example where the initial value (1000) will reflect the close of the current symbol.  I'm trying to get it to start from 0 and show the movement from that point on.  Any help would be appreciated....
//+-------- if the series meets profit targets... close the series--------------------------------------------------------+            if(((profit > target_profit)) )   {                 for(cnt=0;cnt<total;cnt++)...
Anyone can help me to modify RSI indicator like this? or give me some code to edit in metaeditor? It usefull with double RSI The indicator is here https://www.mql5.com/en/code/7898 I need your help guys :)
I have this code before my ordersend, but yet orders are opened immediately. Shouldn't this loop be locking the EA up for 5 seconds? int seconds = (int)TimeCurrent();while((int)TimeCurrent()-5 < seconds){Sleep(1000);RefreshRates();}
Ok so I grabbed this code from another post on this forum, which works great for closing multiple open trades based on FIFO rules. However when there is just 1 open trade to close, it's not closing. What do I need to change to fix this but not break the FIFO capability? void CloseOrders(int slippage...
Hello I'm missing something which I cannot see easily on google.  Maybe I'm missing the point of header use. I'm getting 'RefreshRates' - function not defined when I compile a .mqh file. The same applies for loads of other functions I'm trying to use in a header file. How can I fix this?
Hey  On the desktop MQL4 App I set the message ID under notifications and test, this sends a message successfully to my MQL4 App. I add my EA to the chart, see alerts being triggered on the desktop, but nothing is sent to my phone. Also tried sending to MQL5 mobile app, same result. Please help....
Is there a way to calculate the Average number of Pips per tick? I am new to coding in MQL4. I would like to check in my code if there is a sudden fast movement against my trade and close it out if true.  Thanks for any assistance. Paul
EA automated test can find valid data from June 2004 to begin testing in September to 16 years, the average annual income is 1.5 times more stable funding. I tested the 10,000 fixed investment funds, the number of annual fixed starting hand, have tested a total of 12 and a half years after the total...
Hi, Since yahoo and google have updated their security I am unable to send price alerts to my email address ? has any one else had this issue or can any help me with this problem. Thank you Martin .P   
Hello fellow coders! I was wondering if anyone could point me in the right direction. I am looking for an indicator using Moving Averages to evaluate a currency pairs trending/ranging conditions. It uses 7 currency pairs - USD/JPY, USD/CAD, USD/CHF, EUR/USD, GBP/USD, NZD/USD, AUD/USD. Evaluates...
Hello Everyone,  This could be a really silly question but I really couldn't find the way to do it. I am trying to create an EA. after analyzing some bars, it decides to open and order or not. Let's say it opens an order. somehow if my EA stops or metatrader shuts down, when I reopened it, I want to...
Hi guys, I have a couple of running trades on one instrument. Now I move the stoploss of one order closer to the current price by dragging the stoploss line in the chart. An EA should notice that and change all other stoplosses to the same stoploss price. Because there is no event for modifying an...
First post here, so sorry if this has been covered.    I am attempting to use the EA optimizer with mixed results. It constantly just hangs, sometimes produces 2-3 results, or none at all.  I have a relatively powerful computer, but still nothing. I'm doing a trade that occurs once a week at a set...
Hi Guys, sorry to bother you with so "simple" question, but I can't find [for good time already] any way to move one [or more] indicator windows, up or down below main chart window without closing it and re-opening in desire order. By closing one indicator window and re-opening it I have to...
Hi there, I am looking for a MEGA GOOD MT4 Programmer. Interested parties can contact me over at - <email removed> i assure you that you will not be disappointed.   Thank you and regards
Hi,  I installed MT4 on my PC and my problem is that the custom indicator folder is missing from the navigator window. In all the tutorials that I saw it always exists in the navigator window next to the Indicator folder.   I tried to install MT4 from different places on different computers but...
Dimi.A
Hi Mladen and friends, Just sharing an interesting indicator I've been using to trade reversals on the 15 minute charts called Vertex. The reversals are pretty spot on so far but the "TMA bands" repaint. I think there's a lot of potential in this indicator, it just needs some polishing up. Mladen,...
  Error in strategy tester (11   1 2)
So I run this code in strategy tester   //+------------------------------------------------------------------+//|                                        Bobs Magic Boxes v4.2.mq4 |//|                        Copyright 2016, MetaQuotes Software Corp. |//|...
Last month I traded the GBPJPY & USDJPY, it was soo volatile, I normally wait 10 minutes or less to take profit (20). But now the market is really flat it takes me 8- 10 hours just to pass  that same 20 pips mark. Every single pair is acting like this even the Exotic ones. What can be the problem?...
  Question: Bolinger bands (15   1 2)
Hi all,Need a little assistance with the below function that for some reason doesn't working for me:extern double VolKatan = 3;bool CheckVolKatan(){double CurrentVol = iBands(NULL,0,20,2,0,PRICE_CLOSE,MODE_UPPER,0);double PrevVol = iBands(NULL,0,20,2,0,PRICE_CLOSE,MODE_UPPER,1);return...
Hi just a quick query regarding values for icustom. I tried to check if I was getting the correct values for icustom by using alert function on my indicator. The alerts on my indicator and prints from my ea match up but the data on the data window is different from both so I am not sure if my...
Hi,   I have an indicator, and part of the code draws trend lines on the chart. There are roughly 200 of these lines on each chart, and i have 12 charts running at once. When I change timeframes, obviously all the trend lines need to be redraw, and with 12 charts open it its very sluggish.   Is...
Hello guys, I've tried to do some statistics/testing with EA and write it out into file but file always end up empty.  Here is the opening and writing the info into it - it opens the file but does not write anything into it, what's the problem? int OnInit(){   ZeroMemory(TouchCount);...
hey, I am a beginner with mql4, and I am trying to develope an ea. I have written a code that sometimes enters a trade and sometime don't. when it doesn't enter a trade, the code specifies "130 error" i.e. Invalid stops. is it possible that the stops are invalid due to the fact that the spread is...
Hi All, I am working on an Indicator that shows the Prof/Loss on the chart as a line, as well as, the highest value of the PL going back to the beginning of the chart. I wrote it in Metastock and have pasted a pick of the chart example. I'm not very good at MQL4, but have included the code that I've...
hello to everyone, you can place in the while loop a false condition and when it is true I get out of the loop. I need the while loop but I have to get out of the cycle only when the condition is true. I have to increase the N2 and N3 values of 1, until the loop condition becomes true thank you...
1...787980818283848586878889909192...1249