MQL4 and MetaTrader 4 - page 1389

Hello I am trying to make an Ea that write to a CSV file but I have been trying and dont find where is the error. This is my first mql4 Code, so I hope you can help. I dont know if it has anything to do but I get 4105 as Error Code. It compiles, also the world "open" that I placed inside the if of...
[Deleted]
_orderIdBuy = OrderSend(Symbol(), OP_BUYSTOP, _number, Bid + _pendingPoint * Point, 0, Bid + _pendingPoint * Point - _lossPoint * Point, Bid + _pendingPoint * Point + _getPoint * Point, "some comment", 16384, 0, Green); OrderModify(_orderIdBuy, Bid + _pendingPoint * Point, Bid + _pendingPoint *...
Hi, Some EAs perform spectacularly well when backtested usingcontrolpoints mode, but quickly empty the account when tested in every tickmode. I read the help file about the modes but didn't get any smarter... Would it bepossible to apply some sort of filter or similar in the start functionso as to...
[Deleted]
int start() { //---- int _sell= OrderSend(Symbol(),OP_BUYSTOP,1.0,Bid+100*Point,0,0,0,"some comment",16384,0,Green); Sleep(10000); OrderModify(_sell, Bid + 250 * Point, Bid + 6000 * Point - 250 * Point, Bid + 350 * Point + 6000 * Point, Blue); //---- return(0); }
sorry for asking a simple question in this forum, where complex programming is discussed by experts as well or even mainly. I tried to program a simple indicator which uses an alert when the current price level is x pips away from a given entry(or price) level for example in the sense of: Extern...
  iLowest  (7)
Hi, Just to report that I have got a negative result with iLowest, -1 instead of 1, with Period_MN1. (MT4) I was using the Tester. Date 2008.04.03. EURUSD. From shift 0 to 1. Works well with Period_D1, shift 0 to 30. Regards
  Need Help with imomentum  (11   1 2)
Hello, I am trying to calculate the HIGEST and LOWEST imomentum value over a set period on a given timeframe. For example how do I get the higest imomentum value that was reached on EUR/USD on the 1 hour time frame over the last 50 bars. Any help would be much appreciated. Thanks, Knewday
[Deleted]
  Time[0] Time[1]  (1)
if(Time[0] == prevtime) return(0); this clause is to aviod repeatly order but i do not quite know Time[0] it stand for what??
[Deleted]
i am new in forex .. i want ur suggextion on what broker should i use, i already have meta trader sofware. and i am planning to start trading with the minimum of 200 dollars. expect your responses. tyhanks
[Deleted]
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
[Deleted]
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!
[Deleted]
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 *...
  bug in iIchimoku  (1)
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
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...
[Deleted]
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,...
[Deleted]
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
[Deleted]
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...
[Deleted]
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,...
[Deleted]
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...
[Deleted]
  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...