Download MetaTrader 5

MQL4 and MetaTrader 4 - page 1003

To post a new topic, please log in or register
I just order two pending order,but,it likely to run many,ervry few second later,there will be twe pending order appear in the screen,why? the code as follow : int start() { int LARGENUMBER = 100000; int _orderIdBuy = -1; int _orderIdSell = -1; //step1...
Hi, I developed my version of EA according to this thread. Now you can trail any number of manually opened orders for one chart. Also you can use partial close with 3 targets(if TargetPct1...3 > 0). This EA works outside of last Pivots(R4 & S4) up to invisible R10 & S10. Regards, Igor
I'm currently trying to make backtests on shorter timeframes than 1M. The solution is to import for instance 10S data as if it was 1M data. Works. I could post a link to 10S data from dukascopy in the next days if anyone is interested. cheers!
int start() { int LARGENUMBER = 100000; int _orderIdBuy = -1; int _orderIdSell = -1; //step1 OrderSend(Symbol(), OP_BUYSTOP, _number, Bid + _pendingPoint * Point, 0, Bid + _pendingPoint * Point - _lossPoint * Point, Bid + _pendingPoint * Point + _getPoint *...
There is a bug in . The chikouspan is always 26 periods back as defined by the parameters. Yet when doing comparisons you have to actually tell it to shift 26 periods back. It should recognise this automatically and the chikouspan 0 should automatically be 26. iIchimoku(Symbol(), PERIOD_H4, 9, 26,...
How you all doing, The 1, 5, 15, 30, minute history for the AUDUSD is not completely download to my drive. The data from 1999 and a few years later is all that appears. I have exported 1 hour, 4 hour, and daily with no problem. I get the 1999 to present data. It is neat to see all the old data. But...
Hi there, If I have an object name how do i know which window it is in? THX!
I run MT4 terminal on 4 FXDD accounts. Two demos running on personal PC have frequent tick data freezes. these freezes can last for several hours. I can manually re-login to Demo accounts and tick data feed start again. FXDD Live and Demo accounts running on VPS never have tick data freezes. It...
Hi, I´ve been involved in Future and Forex trading for quite a while and started to like the idea of automating several things. I´m not talking about a completly automated EA as i think the human brain is still better in interpreting information correctly, but helping with screening software and,...
how to get the order status for example,i want to get the condition if my order is purchased if (OrderSelect(_orderIdBuy, SELECT_BY_TICKET) == true) { if (OrderType()) { OrderModify(); break;...
When migrating to MT5, it would be a great time saver if a user could transfer all his code, profiles, templates etc. from MT4
total = OrdersTotal(); for(i = 0; i <= total; i++) { OrderSelect(i, SELECT_BY_POS, MODE_TRADES); if(OrderMagicNumber() == 12321) { if (OrderType()==OP_BUY)OrderClose(OrderTicket(),OrderLots(),Bid,3,Green); if...
I want to order a pending order, and every few miniutes later,I modify it as i am a beginner,would u to help me to show your code While (true){ OrderSend(Symbol(),OP_BUYSTOP, _number, Bid+_pendingPoint*Point,0,Bid+_pendingPoint*Point-_lossPoint*Point,Bid+_pendingPoint*Point+_getPoint*Point,...
OrderSend(Symbol(),OP_BUYSTOP, _number, Bid+_pendingPoint*Point,0,Bid+_pendingPoint*Point-_lossPoint*Point,Bid+_pendingPoint*Point+_getPoint*Point, "some comment",16384,0,Green); 16384 ,what is the mean of this parameters? and the ordermagicnumber () magic is so difficult to understand.anyone to...
If I open a chart, say GPBUSD, how would I programatically be able to find that currency pair name? In my case, my EA will assign the MagicNumber based on what currency pair symbol exists on the chart I open. Possible? Thanks, Merlin
Hello, I have created an EA which I have done in C++. This produces the trades in a file, information stored is currency pair, buy or sell, stop loss and profit target. Is there an easy way for an EA in MQ4 to continuely read in from this file and when a trade is inserted into this file for the...
Jens Sigvardsen
  Array problem (4)
Hi I am a developer who comes from a Java-background. Therefore I have a hard time understanding Array handling in MQL. Lets say I want to make an Indicator, in the calculation of the "current value", I need to know lets say the squareroot of some "earlier values", therefore I want an array with...
Hi Programmers! I have an EA and I'm working on the optimization. Sometimes, I choose more input parameters which cause big number of optimization variation. I run the optimization. Then, the tester of the MetaTrader shows the amount of the variation in brackets: Can somebody explain me what the...
To: MT5 developers Found a bug for u guys it has to do with attempting to declare a Multidimensional Array MQL4 has a limit of 4 dimension MQL5 appears to have restrictions for local variable arrays but can declare much larger arrays in global declarations here: Everything is fine so far... but...
Different Brokers have Different quotes for EURUSD, such as EUR/USD, EUR.USD, and EURUSD2. So trying to use the market info function in the following way..... maxlots = MarketInfo("EURUSD",MODE_MAXLOT); won't return the value if you're using a broker that has a quote of say EUR.USD. Is there a way...
How many ticks will there be in 1min?
I have looked around, but cannot find quite the same problem elsewhere. If it does exist, please point me there... I am attempting to create a custom indicator which will return 3 possible values in a histogram: 1 - when I should be long 0 - when I should be out -1 - when I should be short. I have...
After making a couple of trades, and closing them out, history is not showing all of my trades, even after requesting to display all history. On top of that the history is not showing the price that a trade opened or closed at, it's very confusing, and lacking information.
How do I check through all already opened price? I tried the following, but does not work. if (condition)..... for(bcnt=btotal-1; bcnt >= 0; bcnt--) { OrderSelect(bcnt, SELECT_BY_POS, MODE_TRADES); if(OrderType()<=OP_SELL && OrderSymbol()==Symbol()) {...
Hi all, I am wondering whether somebody could help me with an advice. I would like to create my own log, which would document trading related data for various sessions with my various EAs with various brokers. These logs are to be "aggregated", to be analyzed mainly by a program for various...
I get negative profit when running trailing stop loss because the code does not account for the commission and swap, I tried the followings which don't work need help, thanks! void LongTrailingStop() { int lcnt; int ltotal = OrdersTotal(); double BuyProfit; for(lcnt=ltotal-1; lcnt...
I have programmed an EA and at certain pairs at certain timeframes it is profitable. I basically took the MT4 standard ea and changed the algorithm a bit, took out the lot sizing due to "130" errors. I can set a SL but I want the stoploss to go to breakeven as soon as I am X pips in the plus....
Can somebody please show me an example of how he/she used a buffer on a different buffer? so not the -standard- buffer on price case?
What is the best way to learn forex trading? Iwould like to start trading in foreign exchange, and I am looking fortips on how to get started with forex trading? I have looked at some ofthe trading platforms out there, and they seem quite complex andintimidating. Your help would...
so if you have made a custom indicator, and at the end of your code file you have . . . Buffer[i] = something; } return(0); } But instead of applying this Buffer[i] on price bars, you want to calculate it on the values of a different iCustom indicator. How would you do that? Other_Buffer =...