Download MetaTrader 5

MQL4 and MetaTrader 4 - page 392

To post a new topic, please log in or register
Hello Foum, I use different timeframes in an indicator to make some calculations. At the moment I use all timeframes by creating two arrays like these: string Timeframe[] = {"M1", "M5", "M15", "M30", "H1", "H4", "D1", "W1"};int TimeframeNo[] = {PERIOD_M1, PERIOD_M5, PERIOD_M15, PERIOD_M30, PERIOD_H1...
Hello, I closed MT4. Downloaded a couple of EA's. EX4 and MQL4 files are seen in Experts folder but not in the Navigator in terminal. Even tried "compile" from the editor and they still don't show. Can anyone help?
I have a csv file (eurolevel.csv) with eight support and resistance levels in column A How can I create a custom indicator for metatrader 4 which can read these levels and put them on a 1hr EURUSD chart? Thank you for your help.
Hello, I'm looking for someone to help me check my coding . There's a problem in it . By the way I'm no pro in coding, still newbie, really hope someone can give me a hand on this . I REALLY APPRECIATE IT !!! Thank you .
I am looking for a method to get the position of highest or lowest point of Indicator(MACD,etc) from a period(for example from 0 to 30 bars), when i found out the point of a indicator from them,i also want to know the number of the bar it corresponded. it's so kind of you telling me how to find...
int start()  {  int i,   n,   Counted_Bars;  double Sum,   NatLog,   Sum_Sq,   Avg,   Avg_Sq,   Rms,  R_0,  R_1,  E_0,  E_1;    //------------------------------------------------------------------  Counted_Bars= IndicatorCounted();  i=Bars-Counted_Bars-1;  if...
I was wondering, Has anyone created or seen a MACD in a form of a candlestick? Not a MACD on a chart but at the indicator window. For an example, like the value chart or the belkayate timing indicator. If you have seen one, you mind letting me know.. Thank you in advance and happy trading to you all...
I have made an EA with a function to move "stop loss", I set two parameters for this function"extern int Move_Stop_Small=5,Move_Stop_Big=10;", when I test it many times and modified these two parameters many times, once I set "extern int Move_Stop_Small=10,Move_Stop_Big=20;". what is surprising is...
Hi Guys, Do you have any idea how to check profit for all closed EURUSD positions from current day? The code below returns only last closed order profit. OrderSelect(OrdersHistoryTotal()-1, SELECT_BY_POS,MODE_HISTORY);    Print(OrderProfit()); I make deals on EURUSD and EURJPY, but need only...
  Help to get lower price (11   1 2)
Hi Guys, I want to get the lower bar price value for the period from any time the function is called to the previous 3 /for example/ higher TF bars. What I have missed in the code? This function is in cycle, and gets the lowerTF bar number in iValue. Appreciated. Thank you in advance. double...
What type of pseudorandom algorithm does the MathRand( ) uses, and how random is it? Secondly,is there any way to obtain true random numbers in MQL4 code?
I just got this new EA and I installed it without problems, except for one! Every time I edit the Inputs and click Ok and re-open them again they are set back to defaults! I have re-installed MT4 many time but that didn't change. I thought it was only related to that particular EA, but when I tried...
Which is the best way to detect if the price has touched or crossed a trend line
Is there anyway to make text in "Comment()" different font or even color? Or how to make colorful or fontable text in left-up corner of chart? (All I want is to make the text I set easier to see) Thanks so much for your helps and time!!
Hi all, I am a newbie to MQ4. I am trying to create an EA that places the order after a few bars from a Moving Average Crossover. I know how to identify the Moving Average crossover. I know how to count the number of bars. But when I combine these two into a single EA I cannot get the expected...
As a newbie with MQL4 I feel that I am wasting time trying to correct and compile a relatively small and simple custom indicator progam when it should be a quick task for someone with experience in MQL4 programming. I genuinely feel that it will be very useful to run this program so as to get...
  4051 ,1 errors,etc (11   1 2)
int start(){//IF ORDER'S TOTAL NUMBER BELOW TWO OPEN PENDING ORDERS  while(OrdersTotal()<2){   int Emiral=OrderSend(Symbol(),OP_BUYSTOP,0.1,Ask+MarketInfo(Symbol(),MODE_STOPLEVEL)*Point,3,Ask-500*Point,Ask+1000*Point,0);   int Emirsat=OrderSend(Symbol(),OP_SELLSTOP,0.1,Bid-MarketInfo(Symbol()...
//+------------------------------------------------------------------+//|                                     Reverse_Grid_Martingale .mq4 |//|                              Copyright � 2008, Constin           |//|                                             Constin@ForexFactory...
Hi, I want to make a series of indicators that will be presented as a histogram with three buffers (for long, short and range). I started with a simple one but it looks like I stuck. It is a simple MA. If close [i] is less than the value MA [i] then Sell [i] = 1. What is wrong in the code? Thank you...
I am new to MQL4 and I would love to be in contact with someone reasonably close to my home so that we can occasionally get together to help one another about forex trading in general, and especially in using MQL4. One of us may have better knowledge in somethings forex and MQL4 while the other has...
When I try to use some constants I get a "not defined" error I'm talking about the messegebox's constants that start with MB_ and ID and the SendOrder's Constants that start with an OP_ anyone knows how to solve it?
Dear All, Am trying TAB Space but it is not working How to use it in Comment statement or in Objectsettext ? Please help Thanks
Good day, Does anybody know how to color a candle based on certain code criteria. In Tradestation the code I use is: Range > (AvgTrueRange(23) * 1.8) Therefore, what is is doing is, if the range of the current candle is greater than the average true range of the past 23 candles by 1.8 times, make...
Hello, when you make a picture from your chart then you can save this picture with a option to send it online. Is it also possible to make this process automatic in a EA, so that the picture will be save online when my EA open a new trade?
Hi, we all back-tested EAs and got the statistical report. Then some EAs went live. The idea is now to enable an EA to change its own risk-percent (=opening lot size) due to a comparison of the OrderHistory to the statistical results of the back-tests. I have prepared a function to read the...
Hi Forum, This indicator should analyze all currency pairs in all timeframes by searching for a Pinbar. My definition of a Pinbar is this: Long Pinbar = the lower shadow must be at least 75% of the whole candle. Short Pinbar the same with the upper shadow. It is a very simple definition but I put...
Could someone ping me to let me know if MT4 build 509 is working OK or not. I can't seem to get my EA, which I am testing, to work. It seems to freeze, and I get no updates of Alerts and Comments.
for(int otsb=OrdersTotal()-1;otsb>=0;otsb--)              //Check through open orders      {     if(OrderSelect(otsb,SELECT_BY_POS,MODE_TRADES)==true)          {              if(OrderType()==OP_SELL)                                   // if(OrderMagicNumber()==magicnumber)...
Hi, I am writing paper on Resource management systems and I choose to write about Automated currency trading using EA's. But now I discovered that there is no actual schema on internet, that explains how does it actually works, what kind of servers used, how strong security over the network and so...
Hi all, Was trying to get my head around the iMAonArray function. I noticed that if you use a simple array then the iMAonArray function reads from lower to upper bound of the array variable whereas if the array is an indicator buffer array then the iMAOnArray function reads from upper to lower bound...