Download MetaTrader 5

MQL4 and MetaTrader 4 - page 1073

To post a new topic, please log in or register
My EA is set to trade only at certain times during the day (not between London close and Asian open), but I cannot get this to work in the strategy tester.  I thought I might be able to use iTime, but don't know how to get iTime to return values for "hour." Does anyone know how to get the "hour"...
  New UT . ??.. (2)
UT... M1, M5,...MN.... these UT are so old ! All other platform now allow us to get x ticks, x seconds, x minutes, x volume, ... I think that MetaTrader has to get performed, I 'ld so, but for now, I have to learn other language to make my system. I didn't know where saying that, so I write this...
  Fapturbo (33   1 2 3 4)
Can someone help me with setup of Fapturbo14 ?
Is there a way to position the comments on the top right of the charts as opposed to the top left?
What is wrong with this IF statement. It doesn't seem to work properly. if ( (Hour()== 7) && (Minute() >= 58) ) { }
I need some help in writing the code to open multiple orders in an ea I wrote. It should be able to open another buy, or sell order whenever conditions in the ea are met. Also, how do I place it in order to continue searching through conditions. Thanks in advance.
I'm trying to write a subroutine that accepts 2 parameters(Percent, Lots) and return the number of lots to close based on a percentage of the current trades lots size (CloseLots). The issues are as I see it, the simple (Percent x Lots ) calculation can return values that are not valid when divided...
  Over trading (1)
I have back tested many EA's over the years and one problem i find in alot of EA's is that they can "over trade". I say this because i have often back tested an EA and found that it would make 1,2 or even 3 profitable trades in a row and then create a losing trade or maybe even two. For this reason...
I'm somewhat new to plotting graphs, but have learned how to use the buffer and setting the parameters to draw a line, so please keep your answers on the elementary side. What I'm looking for is an indicator that will let me know when one graph line crosses another, and to create an object on the...
So in the last few weeks we've had:  - Live servers running on the wrong time for over a week as it took them a week to adjust to DST (again!!)  - Demo accounts being unavailable for 4 days Both of these caused considerable pain to EA developers & their customers, however, did "a certain broker"...
I've tried to set up an email alert and I keep getting a message saying,"Message was successfully queued! Look at journal for more information." The journal says,"Mail: 535 authorization failed (#5.7.0)" and "Mail: login to smtp.mail.yahoo.com:25 failed" or "Mail: login to smtp.mail.yahoo.com:587...
I have an EA that closes off half the lot of a trade once a target profit is reached. I would like the EA to remember which order it has already closed so it doesn't close it again. I think the only way I can do this is to save the data in a database (ticket number) and have it check the table first...
Let's face it, virtualization software is no fun. I am happily using MetaTrader on my Mac using a program called Crossover: http://www.codeweavers.com/ Everything works fantastic and quickly and it is MUCH faster than running in an emulated environment in Parallels. However, a problem has recently...
Hi, I'm trying to write a simple script to close a manually opened position, but I do not know how to let the system to "detect" an opened position. Need advise on this. Or is there any sample available? Thanks.
I mean something like exit(0) or so... I want to call it when something bad happens.
can some tell me what is the purpose of this command. what is its function
Anybody has idea why is this order executed? MacdCurrent=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,0); MacdPrevious=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_MAIN,1); SignalCurrent=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL,0); SignalPrevious=iMACD(NULL,0,12,26,9,PRICE_CLOSE,MODE_SIGNAL...
The idea of my EA is very basic. I want to enter and exit on an EMA crossover. Entry: Long 55 EMA Crosses below the 13 EMA on the hourly timeframe. Vice versa with a short postion. Exit: 55 EMA crosses above the 13 EMA on the 30 min timeframe. I have put together some code already however it...
  3k to 133k in 6 years! ;) (13   1 2)
Holy Grail?...Noooope, not yet. But let me share my report with you guys. Honestly, no cheating, no money management with fixed lots size 0.3 lots, no risk control with fixed stoploss 25 pips. Trade only one trade in a time. Please don't misleading by the EA name, it is not only looking for 10pips...
Hi everyone, my search of this comunity doesn't return ant results - today is first day this happened - any idea how to fix it if this is problem on my side? thank you
Would you pls help revise My Close Order, I want Hard Close Order,All Existing(multiply) order should be close all at one Thick( one point) as Indicator triggere if( Signal Indicator triggere exit==1) if(OrderSelect(cnt,SELECT_BY_POS, MODE_TRADES))continue; if...
Hey, play with money you can afford to lose only. Investing is like a business, you win some and you lose some. Easy come, easy go. Therefore, remember that. And also remind yourself that Forex is really worldwide. It is not your relative or your friend: don't fall in love with it. When you lose...
Trying to write some easy code that will draw vertical lines each day at the London open and NY close. I would like it to be just on the current trading day. Any ideas? Obviously, I’m new to MT4. Any help is appreciated.
Hi, I tried putting this: if (TakeProfit!=0) OrderSelect(i, SELECT_BY_POS, MODE_TRADES); if(OrderMagicNumber() == magicnumber) { TrailingStairs(OrderTicket(),TakeProfit); in the end... But I couldn't make it work.. I'm a newbie when itcomes to coding, probably...
I'm absolutely stunned by the behaviour of my EA during strategy testing. Why in the world are there two different outputs. How could Ask be perfectly divisible by CurrentProfitTarget and not equal to CurrentProfitTarget? Here is the relevant code: Print("LookForClose()");...
What is the difference between OrderMagicNumber and OrderTicket? Seem the same to me.
Ocassionally I need to move the stoploss as close as possible to a trade (open, limit or stop). I cannot seem to find the correct procedure to do this. For example with the pair GBPUSD I have tried using MarketInfo(Symbol(), (MODE_STOPLEVEL)) gives 3, MarketInfo(Symbol(), (MODE_SPREAD)) gives 4,...
Im looking for a Reversal bar up/down indicator for MT4.
I've been programming using MT4 now for about a year - watching tic-by-tic and I've finally got a winner. My first attempt out wasn't so successful -- but, it worked; ie., when I bought it bought and when I took profit it took profit - Now, after downloading the latest revision of MT4, my trades...
  HELP ME (1)
ESTOY EMPEZANDO A LEER EL LIBRO, Y QUISIERA SABER SI PUEDO CREAR UNA ORDEN CONTRARIA AUTOMATICAMENTE DESPUES DE EJECUTAR UNA ORDEN MANUAL Y COMO PODRIA EMPEZAR EL CODIGO, SI ALGUIEN ME PUDE AYUDAR LE AGRADEZCO. EJM. HAGO UNA ORDEN DE COMPRA MANUALMENTE Y EL EA ABRE UNA ORDEN DE VENTA CONTRARIA...