MQL4 and MetaTrader 4 - page 559

To post a new topic, please log in or register
I'm trying to figure out the best way to change something like this, 21345.6789 to this, 21000. NormalizeDouble seems to work in decimal places but I would like to round down to the nearest 1000s. I'm trying to use DoubleToStr but it seems like there's got to be a better way.
  Code error (12   1 2)
Hi all I am currently trying to find an error in my code.  I've been debugging this part of the program for some time by now, but I've not been able to find the error.  It must be a very simple one, as the code is very simple, as you can see below.  The problem is that when I try to calculate...
Dear all   What is the minimum tick time difference between a new quote and an old one should be?   Is it accurate to use this code to measure?   int old_tt;double old_bid;int start(){   int start=GetTickCount();   double a = MarketInfo("EURUSD",MODE_BID);   if( old_bid != 0 && a != old_bid )...
Hi guys, I'm having an issue with trendlines. I can't have a short width horizontally. Please see the code: string name1 = "barBody";string name2 = "barClose";int type = OBJ_TREND;int window = 0;datetime time1 = Time[1];double price1 = High[1];datetime time2 = Time[1];double price2= Low[1];datetime...
Good afternoon, (scuse for my english, is not my language) I would want to know if it's possible to buy/sell a pairB from an EA whose is plot on a graph of a pairA. I write an pair trading EA and I haven't error during compliation, however when I test it, the EA buy/sell only pairA and never pairB...
Hello, I use "MT4, Build 482", today I found that function OrderSelect(1,SELECT_BY_POS,MODE_HISTORY) does not return the first order from the history, but returns order from the middle of the history. OrderSelect(1,SELECT_BY_POS,MODE_HISTORY); Print("First Order #= ",OrderTicket()); The Result...
Hello, This is my very first post, i apologize if i can't speak english well.. Iam new in mql4 programming and i want to learn to modify my EA that i got from another forum, its scalping EA.. i want to add feature to set percentage target, the EA will count first the current balance when the EA is...
Hello, Just want to say this board rocks! I have gained so much knowledge just from reading the posts that I have been able to program my own ea! Thanks to all those who freely give their time on here... Kudos! I have moved over to an ECN broker, and naturally I cant enter the stop and target on the...
Hi, can an indicator check or find out whether it is called by iCustom(..) (to speed up: suppress CreatObject(), Print(..)...) or it is installed on a 'live-chart'? Thanks, Gooly
  can i find a error (22   1 2 3)
int a[3,3];a[3,2]=54;Print(a[3,2]); cant find a error in this..gives output 0;
  Garch on MT4 (2)
Hello Everyone , I am new to the forum . I just started using Mt4 and I would be interested in building a forcasting indicator for real time trading based on arch-Garch models . Do you know where I input the source code to create the indicator. Is it the same programme language as Eviews ? Thank you...
hi every body  i want to ask  MetaQuotes  for request to add a new feature in MetaTrader 4 i call this feature "Active Profile"  as all of us know, MT4 support multi profile, every profile have it's charts   we use this normal featur to organize our chart, Some make every profile for specific...
New article MQL5 Programming Basics: Time is published at mql5.com: The article focuses on standard MQL5 functions for working with time, as well as programming techniques and practically useful functions for working with time that are required when creating Expert Advisors and indicators....
gilmt5
  Help me! (2)
Hello.I bought new smartphone. Is it impossible to change background color? Because Not a upper/lower shadow is in sight. only real body appear.
Dear all   When I try to drag this EA to EURUSD M5 chart or choose "Attach to a chart" command, MT4 just gave me no response.    Does anybody know why?   Thanks for your kind help!   wing    int old_tt1, old_tt2, old_tt3;double old_bid1, old_bid2, old_bid3;datetime time, time1;int signal_up;int...
Hi, I'm looking for indicator that includes William's Percent Range and Moving Average on one indicator similar to attached screenshot. Thanks in advance for help.  Thanks GreenPoint           
Hello, I was thinking if there is a way to code something like : 1st position is open at 1.3000 2nd position must be open only when the price reach 1.3004 3rd position only at 1.3008 I was thinking to use: "case 1 at 1.3001 no order send with comparedoubles1"                                 "case 2...
Hello everyone, In one part of my EA I need to compare the local PC's date with the broker's server date, i.e. if ( DateLocal==Day()) { bla bla... How can the PC's date be queried for this (per tick)? I don't know of a standard MQL4 function for this. Perhaps, some sort of a dll that can be used...
if one order is modified by ordermodify() function if trend changes i want to close that modified order Plz HELP ME OUT Thanks is Advance 
Welcome. J wonder, is there any possibility to put the chart windows out of main window Mt?
I download history data but some data seems missing. Data with any timeperiod misses the records between Dec 19, 2012 and Mar 14, 2013. Take M1 for example, the previous bar is Dec 18, 2012 10:45 and the next bar is Mar 15, 2013 05:17. What's the problem?
hello,  i"m tring to use the iStochastic oscillator function in a way that i will know when the Signal line is crossing the Main line any suggestions how to do that?  Thanks in advance   ic  
Hi,what API are you using to get the data that is displayed with metatrader?
Hi Everyone, I am just getting started in MT4 and wrote a short function.  Lots of errors on brackets and other.  Any help would be great!  Thanks    if BaseTradeOpen(OrderSymbol(), MagicNumberLong, Long) && SubsignalTradeOpen(OrderSymbol(), MagicNumberLong, Long)    {     //OrderSelect(BuySubsignal...
  How to secure my EA? (13   1 2)
Hello, I have written EA for my client. i am not expert. i like to secure the code by account number. eg: the EA should run with only this account number:"111111" and demo. if they try other account which should show warning message. Please advice the coding to insert on my coding. Thank you in...
I am writing a program that populates a matrix in MQL4 via iClose() and then passes the matrix to R. The data that R is receiving is incorrect for all currency pairs. I have gone over the code 1000 times and cannot figure it out. Anyone else ever experienced iClose() passing bad values? Here is the...
Iliya
Forex forum. MQL4.community website was created for MQL4® programmers. The specific purpose of the website creators is to afford all visitors an opportunity to freely communicate and discuss issues of programming in MetaQuotes Language 4.You will find here the full description of the language,...
Hello all,  When iCustom is repeated called by an indicator (with different parameters each time), is there any performance benefit to be had by incorporating the external indicator, rather than making these repeated iCustom calls? The procession of "Custom Indicator xxxxxx: loaded successfully" and...
Hi all, could you give some tips to speed up optimization?. Regards. 
I have created an indicator where there are 4 extern values: MAE1, MAE2, MAE3, MAE4 Is there a function  to place these in numerical order from lowest to highest so that MA1 contains the lowest MAE1-4, MA2 contains the next lowest, etc? Seems that the code to do that by hand would be rather intense.