Download MetaTrader 5

MQL4 and MetaTrader 4 - page 567

To post a new topic, please log in or register
  MACD indicator (11   1 2)
Good afternoon, I'm using MT4 and specifically I like to use the MACD indicator (among others), but need a clarification ... someone could explain that mean and how numbers are calculated (sometimes positive, sometimes negative) , appearing on the MACD when you put your mouse over one of the bars...
Hi guys, i want to know how build an array serie (i think) of period? HighPriceM30= iHigh(Symbol(),PERIOD_M30,1);LowPriceM30= iLow(Symbol(),PERIOD_M30,1);HighPriceH1= iHigh(Symbol(),PERIOD_H1,1);LowPriceH1= iLow(Symbol(),PERIOD_H1,1); The aim is simplify the code. Maybe it is not an array what i...
Can this be done on MT4? If it is how? Thanks in advance.  
Hi, newbie question: If I have an EA attached and running on chart A, then I tweaked the code, recompiled and attach it on chart B, will it affect EA on chart A?
Hi, If you think you have enough in you to code a very complex trading and indicatorsystem for MetaTrader 4, and you want to earn very serious money using your MQL4knowledge, now it is time! Please send an e-mail message to snaipear at freemaildot hu to receive more information. I'm looking for...
can we backtest an ea with dll imported or not?
properkhunt
  Close at percentage loss (13   1 2)
I have the necessary code that allows open orders to close once the predefined percentage of profit is reached (below). I can't find any command in the dictionary that would perform the same function to close at percentage loss. CloseLossPercentage is not a recognised command. Any help please....
Hi all, I am coding me new breakout system and I have little problem with it. I need two lines, one for low, one for high. I want to take this high, low from 5M chart between 9 and 10 hour. Can you help me? Thank u soo much   LukasFX 
I am using an EA as an alert indicator, that also adds an arrow on chart, when conditions are met signal is given.  I dont understand code about counting bars, i just want the alert given at the tick by tick instance, then not repeating, so wait to next bar or 1 signal per bar.   I can post the file...
Hi,   Is it possible to get the active chart type (line, bar, candle) from code?   Thanks! 
I am sorry if there is another thread like this in the forum. I just couldn't find it. My question: is it possible to create EA that will export data like "profit", örder symbol", "equity" in .xml format to web site? Is it possible to do this without the build-in ftp servise? Thank you!
Does anyone know the function or combination of codes for creating a mini-chart? Images below. I have the website and .ex4 for the indicator of the second image. Any examples like something in the code-base would be very helpful. I cannot find any myself.    
Could anyone help me to figure out how to extract the parameters sets from a custom indicator? The Data Window show Value, Value2, Value3.  A buy signal returns a numeric Value3 greater than 0 and a sell signal returns a numeric Value/Value2. [CODE]double sig_buy=iCustom(NULL,0...
Hello. I am trying to implement a strategy to an EA ,  is based on fundamental news ,  opening 2 pending orders before the news BUY and SELL with stop loss of 6 pips and TAKE PROFIT (open), , lets say the event is at 13:00;00 GMT but I want the EA open these 2 pending orders at 12:59:45 If the...
Hi, sometimes I send order, then it is on  server  and after one minute  I get error 128 (TRADE_TIMEOUT). Is it possible that I get ticket equal to -1 and error 128, but the order is opened after some time ? Or after I get error 128 order is deleted on server? Thanks, Piotr
  help code please (16   1 2)
Good afternoon. I hope this time you can help me :-) Here is a piece of code, this code only works on the pair lying on the graph. but I need it to work on any pair. example is my indicator on GBPUSD fonctionneras this code very well now I'm on GBPUSD and EURUSD parameter I put the it does not work...
I use custom time frames using the Period Converter. My issue is on Sunday night when the Forex opens for the week, all of my custom time frame charts start their bars when they didn't finish their cycle Friday afternoon. A 5 hr chart might be only a couple of hours into its cycle all but to renew...
Greetings everyone, I have a quick question. I'm trying to rewrite most of my indicators so they work through history (I want to use them in visual testing through history - sort of forward test) and I'm having a royal pain regarding the TimeCurrent function. Seems it works in a way that if you're...
Hello. I hope I'm not off topic. My coding skills are only limited to copy, paste or delete small bits of code. Would it be possible to any clever guys here to implement an option in the attached indi so to modify the server time shift on different brokers? There is a time shift option but it only...
Hello Everyone, I try to create the strategy for EA. It is based on simple averagefrom indicator. Strategy which I have already created is below: MA_1_t=iCustom(NULL,0,"TEST",4,6);  MA_2_t=iCustom(NULL,0,"TEST2",4,6);      if (MA_1_t > MA_2_t && iWaitFor == PLOTUP)        {      double...
Hello! I have a strange problem with Trailing stop. I did my own but I always get 130 error. I saw the page: https://book.mql4.com/appendix/limits and after that, I can't understand the error...  The code is: extern int DistanceTS = 20;...if (OrderType() == OP_SELL) {        double stopLoss =...
I am having a problem where double values are seemingly being ignored during the execution of a cycle. I have tried many ways to fix it, but I just can't see a solution. Can anybody else see what is wrong here? Am I going crazy?!? This is a simplified version of a piece of the code. (It has been cut...
How can I test of a string is blank? For example: if( !empty(MyString) ) {  Alert("This string is not blank.");  }   
Hello, Several MT4 platforms are crashing right after opening (on the same computer), and the day's log stores the following line. main pumping: timeout on stop Deleting default profiles does not help. It just opens and crashes after some seconds, it does not connect to the broker server. No more...
int start()   { //----     //----   double x=0;    x=OrderProfit();    if(x!=0)    MessageBox("totalprofit "+ x);        return(0);   }      hoe can i get the totalprofit in actual time ?  
Hey all, I was very happy with the help I received last time I posted in this forum, so I'm back with another n00b question. How can I make my EA open a trade when an indicator running on a chart (say the EURUSD) gives an alert? Specifically, I have an indicator that will put a little blue circle...
Does anybody know how to rename chart tabs?   I would like the names to be a lot shorter, and therefore fit more tabs across the screen.  For example instead of AUDNZD,M1 it could be named AN1, and AUDNZD,M1(offline) could be ANO.
Hi, I'm looking for your help for my code mql4. Although I tried a lot of things I don't find a solution to resolve my problem. So, according to my strategy: 1st PART: I take a Long trade 0.10lots without SL and with TP1,at the same time, I take a Buy Limit 100pis below the Openprice with 0.20lots...
Friends, this looks very strange to me. This function works: if (MathAbs(total_profit) < 1.0){      line_name = "ZERO LEVEL ex SWAP";      line_color = Black; draw line etc...  When I change it and add division by a double number, the function remains in a cycle or freezes, it simply stops working:...
Good afternoon. is there a converter MQL4 -> MQL5? If not, why does not Metaquote? I know it must be hard but if a company is able to create I think that's why they? I think many would go under metatrader 5, but the programming language is very complex for people who are not computer Metaquote then...