MQL4 and MetaTrader 4 - page 610

Good morning I'm a newbie in mql4 and i still don't  understand how put value of moving averange in array. I get always some errors (like array out of range)  I just need and alert when the value of moving averange in the previous candle is more high then actual candle in OnCalculate process. Can...
Hi, I want to reset an indicator loaded in my EA. Because this indicator has a small repaint issue, once a signal set, the indicator didnt revert back the signal to empty by it self. today my only option is to change the currency where my EA is set or recompile my EA or eit the EA properties and...
[Deleted]
hi i m Marco from Italy and sorry if my English is not good ok? I have one problem, i have the indicator RSI Blackfeet, is very nice indicator but i want insert sound alarm when the condition is true, this indicator have RSI and MA i want insert alert when RSI cross MA. Please help me tanks bye
Heey people! I'm trying to set TrallingStop the next candle. But has no results.  Thank you. Sorry English error.  static datetime new_time = 0;           if(OrdersTotal()>0)      {         for(int i=0; i<=OrdersTotal(); i++)         {            if(OrderSelect(i,SELECT_BY_POS...
Hi everyone, I'm Max. I am a neophyte in the MQL4 programming and speak little English, so excuse me. I have a problem I can not solve. I have an indicator / alert built on CCI Histogram. I inserted the conditions that work. I would like that the last bar of the histogram, was read at the opening...
Hello, I have compiled a script without any errors for a graphical object (see attached file 'research grafobjects.txt'). But the graphical object is not visible on the graph I load it on. My journal displays messages that 1) it loaded successfully the script on graph, and 2) it was removed (the...
How to setup 2 or correlated pair in chart m t4
[Deleted]
A couple of years ago I had this working and got side tracked and in that process somewhere lost the old code.  Trying to get this to work again but not having any luck and I don't know this language well enough to sort it out. Also not really finding much in the way of working examples. I know I...
Hello everyone, I need your help :) When I introduce indicators that I bought on graphs, the graph is erased and I have the following error message: UNINIT reason ... 4 (see the attached photo) Is anyone have an idea of the problem ?  Thanks you very much,   Stéphane 
I've been having some issues with custom indicator coding that I didn't have before. I write the code and it compiles normally, but when I try to attach the indicator to the chart the indicator doesn't appear on the security window...  Here's an example of code that I copied from the MT4 book that...
Hi guys, I started experimenting with a new piece of code that closes orders if the macd reaches the max of its values since 20bars(for example-if the order is buy) and reaches the min for a sell order. It is a function I wrote it looks like: this is the array i use:double macdarray[20];and int...
may we use global variables pass infomation between MT4 and MT5 terminal ? if we can ,if it will cause mistakes ? thanks .
[Deleted]
  can anyone help?  (1)
hi everyone, i m new to this forum. m trading for last 6 month. living in Australia. and one friend of mine is trading for me in my account from other country with different time zone . throughout the day i watch his trading in my account in my laptop. but sometime i m sleeping then i cant see
Hi forum, I am using the following lotsize calculation: double moneyRisk = AccountBalance()*percentRisk* 0.01 ; double lotSize = moneyRisk / (entry-sl)*dir / (MarketInfo( NULL , MODE_TICKVALUE)/MarketInfo( NULL , MODE_TICKSIZE)); lotSize = MathFloor (lotSize/MarketInfo( NULL
Hi Coders, I would like to know the position of the Bid price relative to the TRIANGLE object. Whether is it inside a TRIANGLE or not? Do you have a simple idea for it? Thank you in advance. Relative
I have aclass that I use to check for a new bar. I initiate a timer in OnInit with theiTime function.  Then in OnTick I checkto see if the timer still corresponds with the time of the current bar. YesterdayI noticed a weird behavior in the Strategy Tester (ST), which doesn’t happen inreal trading...
[Deleted]
Hi,   I am having problems with my code, I am personally opening 1 trade at a time per EA window but i have been told that numerous trades open for other people. Currently i have this code here:  in start() double stoplevel=MarketInfo(Symbol(),MODE_STOPLEVEL); double stoplevel=MarketInfo(Symbol()...
[Deleted]
 Am looking for code to turn TP into a Trailstop when it is reached.  What are you looking for ? 
[Deleted]
Hi, Is it possible to make an indicator which would calculate profit/loss of possible trades done by EA? I don't want it to show the real balance but something like the balance graph in strategy tester. Basically EA would buy and sell without actually placing any orders, calculate the profit/loss of...
Good morning i wanna know how to export automatically real time data from excel to MT4 Trader
[Deleted]
Hi I'm trying to create a spreadsheet in Excel 2010 that displays the High Low Open Close for EUR/USD each day for one year. I've tried using DDE in MT4 but can only seem to get the High and Lows from that. Does anyone have an idea as to how I should go about this? If not with MT4 and DDE then where
I know how to limit the number of trades in a candle. However, what I am trying to do is limit the number of trades between 2 points based on price levels.  I define a price level as an input, which serves as my buy price.... If my buy price level for EURUSD is 1.1150, I enter a buy order once the...
<Advertising removed >
Hi,   I'm currently having troubles with replicating the equation used by ObjectGetValueByShift. I think I'm having trouble getting the algebra correctly. I've been using this site as a source; https://www.mathsisfun.com/algebra/line-equation-point-slope.html , but I can't wrap my head around it....
Hi guys. Since I started using MT4,after I download something with utorrent,the MT changes the connection status speed to around 200/2 kb and when I try to place an order,it shows me the "No connection" error.To make it work again properly,I must uninstall and install again the MT4, but after I use...
Hello people!! Why some programmers put the "!" before a function ?? example: !isPositionOpen() and isPositionOpen() What do the different "!" ??   thanks for help! =]
hi guys im triing to open orders if a spwcified prices between highs and lows is reached, but the ea does not open orders. the findentry and buyconditionis called every tick, can someone help me to get this snall snippet working? ist there maybe a problem with the speed of the whole program, i have...
hello, i like to know where the platform take the data when i use iMA function? i delete all my ex4/mq4/mqh files from the platform, but when i call the iMA function from new indicator its still working... where the data is comeing from?  tnx  
New article Graphical Interfaces I: Functions for the Form Buttons and Deleting Interface Elements (Chapter 4) has been published on mql5.com: This article is the continuation of the first part of the series about graphical interfaces. The first article Graphical Interfaces I: Preparation of the...
[Deleted]
  Histogram buffers  (19   1 2)
Can someone please confirm how histogram buffers are used when writing custom indicators? I have already created an indicator that draws a line on the chart window. I now want to add histogram markers above and below the line in two different colours(green above, and red below, for instance). Can...