Download MetaTrader 5

MQL4 and MetaTrader 4 - page 960

To post a new topic, please log in or register
For instance,I need to get the highest price in the past 75 minutes on the current chart . I used the following codes to get it, but it did not work well, because there are always some bars missing,especially on M1 charts. ...... extern int StartBar = 0; extern int BarsBack = 75; ...... int...
  order select (5)
it possible to select closed trade from history but how do you chose the last closed trade out of all the trades in history. any idea inregards to this will be very appreciated
I'm trying to port trading methods to MT4 for semi-automation. I am having trouble figuring out the math behind having it figure out lot size ( especially for the EURJPY). Basically, I don't want to risk any more than 10% on any basket of trades. Each basket can hold a possible of two trades, the...
I'm looking for a broker that allows hedging and has a mini/micro account. Does anyone know of any good ones? For me it used to be IBFX but now they stopped allowing hedging. Thanks, -Ron
In the documentation: int DayOfWeek(   )Returns the current zero-based day of the week (0-Sunday,1,2,3,4,5,6) of the last known server time. int DayOfYear(   )Returns the current day of the year (1 means 1 January,..,365(6) does 31 December), i.e., the day of year of the last known server time. From...
How to trade on several hours then sleep and continue again ? for example start at 18.00 to 21.00, sleep for 2 hours, then continue again at 23.00 to 6.00 in the next morning. I tried with this, but why on tester it only trade at 18.00 to 21.00? if ((TimeHour(TimeCurrent())>=18 &&...
Hi, Im very new to MQL4, Please suggest me where can write MQL4 code, is the any tool? Thanks, Venkat.
HI ! EVERYONE I REQUIRED TRADELIMIT & CLOSEALL BY MT4 CODE PROGRAMMING Q1. EVERYDAY! ----ONE DAY TRADE TIME-----FROM 7 TO 23 TRADE SYMBOL-----USDJPY(H1), USDCHF(M1), EURUSD(M5), USDCAD(M30) SYMBOL PROFIT= 2% DAY SYMBOL TOTAL PROFIT=5% IF TOTAL PROFIT >=5% OR TOTALPROFIT <=5%...
I am looking for a script that when it is actioned, it will buy and sell the same currency at the same time creating a instant hedge. It would also need to be able to change lot size. example buy 1.0 and sell 1.0 or change to buy 0.1 and sell 0.1 Any help in this matter would be greatly...
Build 224 did not exhibit consistent 'need' for over 90% on regular basis. running on terminal: 12 symbols in market watch 2 simple charts - no heavy indicators... using Process Explorer from sysinternals.com the graph is consistently spiking and holding for seconds at a time in the 90% + range. as...
my massagebox() code is not working??? //EXPERT INIT SPECIAL FUNCTIONint init(){   //local variable   bool oc;   oc = ObjectCreate("buy here now",OBJ_TEXT,0,D'2009.12.10',Ask);   ObjectSetText("buy here now","buy here now",12,"Times New Roman",Green);   Alert("object created = ",oc);   int y;...
Hi, I'm a new comer to ForEx but have been around and used computers for quite some time including a little bit of programming. I'm interested in programming some EAs for the MT platform, but being overloaded at the moment, including working at learning the how’s, ins and outs and the dos and...
I want to share my profitable EA, it TP is about 3-5 point of EURGBP run in 15minutes but before run and backtest, please make sure your br oker which spread small that 0.00045 of EURGBP Please comment after download~ ~ Thanks <> i provide the download link of the best broker of using my EA: http...
Hi, I have a separate window indicator that plots an object on based on high low price, but on the next bar the object disappears. I would like the object to remain on screen i.e marking the low unitl the corresponding high appears. basically the down arrow stays down until the up arrow appears,...
  Error logs? (3)
Hi When I try to write any script if it does not work I get no errors? I look in the journal and it just states SCRIPTNAME removed - am I missing something here?
I am looking for someone based in the UK to write some EA's for me. I am finding programming difficult !! I expect to have to pay but please make it reasonable. Kind Regards Simon
Hi, just like the subject, i am having difficulties to define the last closed order. What is the code i should add? Thanks for your help.
Can someone add registry by using winapi? I want edit registry in MQL4 code.
Whenever my indicators create objects I prefix their names with the short name of the indicator so that upon deinitialisation they remove only 'their' objects. To remove them I want to use the function below. For some reason though it doesn't seem to be working right. Could someone please point out...
Hello: This is my first time posting in the MQL4 community and I appreciate your time and consideration in advance. I have been successfully utilizing my EA across multiple brokers for over 12 months. Most recently, I've switched to utilizing 2 different ECN platforms during which time I noticed...
I have the indicator as below. I would like to use this to place order in the ea, can someone please help? I would like to place buy order when the green dot firmed (2nd green dot appeared). My buy order will be at the last Fuchsia dot. Please help me in placing order, thanks Indicator : Price_Stop...
Hi all. I'm new here and I have a question. Is it possible to draw two different currency pairs on one window in mql4? I can make my own indicator, and re-draw current currency chart. But what if i want to draw from a CI a chart of another currency pair (not the one in which program is hosted on)....
Hello, just wondering if it is possible to convert this MT4 indicator to MT5 for me please. Thank you
Im trying to figure out how to make my EA draw horizontal support, resistance and diagonal trend lines and move them as it goes to reflect current data. Ive been reading the MQL reference documentation but im still confused on their exact implementation and use. The intent is to produce real time...
Hi, I am new to MQL4. I made my code. It works ok and make all the prints that I want when I run it in simulation. When I activate experts I was expecting that those prints appear again in the on-line run, but nothing happens. Can someone help me ? Thanks Miguel
Hi, I am trying to get my SQL code to detect whether value x is divisible by three e.g. 6/3 == true 12/3 == true 16/3 == false 20/3 == false How do I do this in mql4 language please? I've search the documentation but can't find anything Thankyou for your help James
What should I do on Meta Trader platform in order to make enable function IsTradeAllowed()?
I finished coding my profitable EA a month ago. I have several choices to get benifit of it. Either sell the .ex4 code by linking it to my server using dll technique, or use it as signal provider on some famous sites like, collective2 or fx-auto. But the last choice is not possible as I have no...
Hi, I am developing an indicator based on another indicator (channelProfit). What I am trying to do is detect when the channelProfit changes its signal (its buffer 6), and signal it in my indicator with an arrow (separate wondow bottom row). In addition, I am trying to see what's the situation on...
Hi I am looking for a way to smooth an eMA with my own function contrairely to the pre-defined constants in the "applied_price" parameters. (see iMA function). Is it possible ? otherwise what is your suggestion ? Thanks in advance Fabio