Download MetaTrader 5

MQL4 and MetaTrader 4 - page 466

To post a new topic, please log in or register
Hi all,  Say that I want to use same ea in more than one pair, is that enough to put different symbol an magic number in each ea instance to avoid conflicts (Iscontext busy) or is that necessary to  use of  a Retry routine or even make use of a mutex ? Thank you in advance for any clarification....
Hi there I m trying to call ZUP indicator so to embed it on my trading system i m building. What i m trying to get is the X,A,B,C,D points and the XD,XB,BD & AC points. Anyone did this before out of a ZUP indicator?  
for the ordersend function, how does the expiration time parameter work? if I put in an integer like 5, does it mean the pending order will be canceled after 5 bars?
Rgd: Coding on Getting High & Low of Chart Hi guys.. I am currently trying to code a Indicator that can get me the HIGH & LOW that is from Current Bar to 150 bars ago.. I tried to google and try various method but seems to have issue getting the proper data. Anyone can give me a sample with alert to...
iBarShift - MQL4 Documentation states that when a match is not found it returns the nearest (exact == false). In tester (Build 500) on M15 bar <2001.02.19 01:30>, iBarShift returned 11, for a request of <2001.02.18 22:00> Time[11] = <2001.02.16 21:00> 49 hours earlier - Last bar before market close...
I want to invert two arrays in EA. Can you suggest me any code ? For example, I've array1[x][y] and array2[x][y]. I want to get all contents of array2 in array1 and contents of array1 in array2.
Hi, I understand that hedging is generally allowed on MT4 platform. As I would like to give a demo account to a manager and would like to copy trades on my real account. I don't want him to hedge any of the open position, that is, not opening a new trade in reverse of any open trade. Please let me...
Hello,  can I use a language other than MQL4 on Metatrader4? For example, could I program on my own language and then interface with Metatrader?
Am I being really stupid here, but since activating one-click on my MT4 platform, the OrderModify() function in my EA does not seem to be working?  I know this is not a coding error as the same code has worked for years before.  Also how do i turn one-click off as unchecking to Tools/Options/Trades...
New article MQL5 Cookbook: Using Indicators to Set Trading Conditions in Expert Advisors is published at mql5.com: In this article, we will continue to modify the Expert Advisor we have been working on throughout the preceding articles of the MQL5 Cookbook series. This time, the...
I have an EA wich I have checked numerous times over a period of many hours. Each time I compile the EA I receive this message '}' - unbalanced parentheses                           C:\Program Files (x86)\MetaTrader - Alpari (US)\experts\Trail_Capture_EA.mq4 (254, 1) I have used an advanced editor...
I need read any data from history orders in my EA (count history_orders, profit/loss my order ticket), but in tester mode return nothing....?  Is possible get data from order history in tester mode??? Thank you. 
Hello. I would like to ask you some helps, cause i need an Expertadvisor (for MT4 or MT5, knowing I have no problem to install one or other ofthe versions of Metatrader). I need an expert advisor, that could give soundalerts for various forex pairs simultaneously and according to my ownpersonalized...
Hello, iCustom VS file includes (MQH.) vs. libraries (. MQ4) If I use the code in both, an indicator and a EA, what is the right place to put my code ? Between iCustom, the include files (. MQH) or libraries (. MQ4), where to write my code? And why ? Thank you,
Would EA coders please share their experience for how many pairs and/or timeframes do you need to see sound backtest results before you consider the EA worth demo/live testing? I'm sure there are many people who optimize their EAs on e.g. eur/usd M1 chart and are happy to go live. I'm generally not...
Im sure this is simple, but I simply cannot find it ANYWHERE. I simply want the text on my x axis to be alot shorter. Like maybe it not repeating the word "May" until the month changes... http://i.imgur.com/TWgqr6g.jpg Incredibly annoyed cause ive been trying to find the answer for an hour or 3 now.
Hi I have a friend that has an EA, he gave me to watch it on an investor account. Is there any way i can see what indicator the EA uses from the investor account? to read the EA working on the graph somehow?   joseph 
Hello Mql-team,   since your last update, the chart shift function is off, if you make a picture. ONE CLICK TRADING: Can you install a stoploss order and a take profit function in the one click window ? (very usefull) Analyze: a yearly button for yearly Charts, like other plattforms ??(USEFULL),,,,...
Hey guys,  I just found this site, let me know what you guys think, it's pretty interesting for fundamental analysis. I have never seen this before :)  XXXXXXXXXXXX
Hi All, is it posible to code a different target function? (profit factor, balance...). If so, could you give some tips or sample?. I would like to optimize by win/loss ratio = 1 (avg winning trade / avg losing trade). Regards. 
I'm unable to figure out why MT4 strategy tester is having issues properly realizing moving averages based on high periods (such as 1000 or more bars). I've tried both iMA as well as iCustom (referencing the provided Moving Averages function and the printed results (just printing the MA price for a...
  Saving values (6)
Hi, I am trying to save Price value as X, but X is still refreshed after every tick. Could you please give me a small tip how to improve my code? double Price;double X;int start(){//Time[t0], if Bid>1.3000 -> X = current EURUSD(Bid){if(Bid>1.3000){Price = MarketInfo("EURUSD",MODE_BID);}X =...
Help me to add 'magic number' input in attached EA.
Any advice most welcome, searched high & low. Can not find any code to do this.   OrderSend("EURUSD",0.1,Ask,3, ??? What next );  
Hello, I want to trade baised on the USA Eastern times. But my broker is located somewhere else, so it doesn't have the same timzone as USA Eastern. How can I code something that it check what time it is at USA Eastern and it trades for lets say at 9:00am USA Eastern time? Also it needs to work with...
Hey guys I was wondering did anyone code their EA to simulate live trading on the live feed ? I am going to code mine to do that and would appreciate any ideas/input. I figured I would code some functions to simulate the server responses to all the trade related functions, like OrderSend()...
i dont know where to post a thread for suggestion but i hope metatrader will add functionality to metatrader 4 for android levels on moving average
Good afternoon, I have quite a weird problem, I am trying to extract the highest and lowest of all closing prices of a given period without sucess. This is what I have so far. double DCloseHighest(int shift, int period){   return(iHigh(Symbol(),Period(),iHighest(Symbol(), Period(), MODE_CLOSE,...
Hi, I'm coding an "EA" (not full automatic), the idea is that i create 1 support and 1 resistance (both are angled, not horizon). Both lines is created in init() area and by extern input (time and price). If price touch line EA will place an order with setting stoploss and target profit. However,...
Hi guys, example: I have array int Test [10] [10]  and I need sorte (ascending/descending) array rows sometime: a) by the 1th column   for it I can use:  ArraySort ( Test, WHOLE_ARRAY, 0, MODE_DESCEND );                  b) by the 3rd column    How is effectively code for it? Thank you. 
1...459460461462463464465466467468469470471472473...1250