MQL4 and MetaTrader 4 - page 893

To post a new topic, please log in or register
I am trying to create an EA that will get the highs and lows for a given time period, i.e.; 00:00 - 03:00. Searching through the forums, I have come up with the following code, but it doesn't work. It prints out 0 instead for the price for the highs and lows. I also get this warning when compiling...
Is there anyway to display the order profit/loss on the chart in window? Specifically I would like to display the net profit/loss of 2 orders combined... I am adding the OrderProfit() to get my figures from the 2 orders, and adding them together... now I need to display that number somewhere I can...
I would be very happy if someone could help me with the following question! I downloaded the MetaTrader4 Software from "http://www.metaquotes.net/en". I downloaded also their quotes for EUR/USD in the history center. Then i I drew a some chart / trendlines and made a template of these drawings. Now...
Hi there, I trade with IBFX. I found an expert advisor on the MQL4 website which I need. I downloaded the advisor and saved it into the "experts' folder in the IBFX file on my computer. When my MT4 application is open I can see the advisor in my navigator window but when I click on it, it doesnt...
Given stderror.mqh and https://docs.mql4.com/trading/errors I could spot some differences... ERR_NOT_ENOUGH_RIGHTS (7) is missing from documentationERR_MALFUNCTIONAL_TRADE (9) is missing from documentation ERR_BROKER_BUSY (137)is missing from documentation ERR_TRADE_EXPIRATION_DENIED (147) is...
hi everybody I have been trying to get the value of technical indicators commented on 2 differant pairs at the time but I seem to have missed something on my way maybe someone could help me out with it. here is the code...
Hello, Im using a for loop to determine how many times price has come near a certain level. I am getting an error on the first line, saying "<= asignment expected" any idea? I have already defined the Piv variable in the beginning of the EA. thanks Piv=(iHigh(NULL,1440,1)+iLow(NULL,1440...
Hi, I have some trouble using the OrderSelect function: int Ticket = OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,SSMA_Low,Ask+(SL*2)*Point,"Test",123456,0,Black);  if(Ticket>0)  {   if(OrderSelect(Ticket, SELECT_BY_POS,MODE_TRADES)==true)      Print("open price for the order ",OrderOpenPrice());...
Hi Folks, I've got some serious problem with the coding of a order management for my EA. So to show you a snippet of my code:    // check if orders are existing which needs to be closed   int total = OrdersTotal();      for(cnt = 0; cnt < total; cnt++)   {      OrderSelect(cnt, SELECT_BY_POS,...
As somebody that is new to MQL4 I was just wondering which shift will be returned if there were more than one shift with exactly the same maximum value/price over a number of periods, e.g. in the following standard function: iHighest(NULL, 0, MODE_HIGH,30, 1 ) Will it be the first or the last shift...
hello all will like to know if its possible to make default EA mt 4 To take profit.the EA is attached here
Good Morning Sir I`ve tried So many times to send mail to my Gmail account from The MT4, but it look`s like Gmail doesn`t Work With Mt4 Can You Help Me Please For any SMTP Server That work with the MT4 Program . Thanks
Sometimes on an MT installation the drawn MovingAverages and the once you from the iMA are differnt while the Period, shift,MA type, etc is the same. I've uninstalled and reinstalled the MT4 with no success. I have seen other similar threads on this board without any response. Any idea?
Hi, is it possible in MT4 in init() function of EA to do something like this... and how? Example: 1. Price=Bid 2. ticket1=OrderSend( Price+0.005, OP_BUYSTOP) ticket2=OrderSend( Price+0.005, OP_SELLLIMIT) ticket3=OrderSend( Price-0.005, OP_BUYSTOP) ticket4=OrderSend( Price-0.005, OP_SELLLIMIT)...
Hi all, I have attached a indicator which is giving the signal after 3 or 4 bars later, can anyone change it to give signal after 1 bar, pls help
I have the following code that executes at certain times when i want to exit all open long positions (and another one for short positions) void CloseLongs(){for(int pos = OrdersTotal() - 1; pos >= 0; pos--) if (OrderSelect(pos, SELECT_BY_POS)            &&  OrderMagicNumber() == magic )    {...
Hi, how can I draw an horizonal line, which I can see only on the actual day? That is my old code: ObjectCreate(name,OBJ_HLINE,0,Time[0],high,Time[0],high); ObjectSet (name,OBJPROP_COLOR,MediumSeaGreen); But what should I change now?
Hi all, I wonder if any of you MT4 gurus could be of assistance to me? I would greatly appreciate it. I have an MT4 application which consists of 1 EA and 1 script. The EA, as you know, executes the start() method per tick. The script I have written has a while loop which sleeps every 1 milliseconds...
Is there a tool or a web site where you can find quotes of different brokers for EURUSD?
I want to review various symbols (shares) with EA and select the one that best meets my strategy, the more ROI estimate. Once you select a symbol the EA should apply the strategy to that symbol. My problem is to select the symbol that meets my strategy, I do not know how to switch from one symbol...
Hello, In the attachement I enclose a great indicator which works for me in any timeframe. I think it would be great to make a simlpe EA robot based just on this indicator. Only SL, TSL, and maybe TP would be necessary to add to the EA to be able to trade it successfully. Could anybody try to...
What's going on with the search option?
Hi, last night I got this error, I know what it means, but the weird thing is that after getting the error, my EA stopped working - it stopped moving the takeprofit, it stopped closing the orders, leaving one order open up until morning. This is how I handle these errors: if (Error == 136) {...
can someone help me to input take profit to this EA.i have been trying to make it to take take profit on is own but all effort is abortive.here is the ea which i attach .thanks
I am in the process of back testing a new EA. I use the "every tick" model, but get no values for the High[], Low[] and Close[] arrays (all are == 0) I get only values for the Open[] array. Can anyone explain to me why this is happening? Is there a setting somewhere that I must adjust, or is my MT4...
Hello Traders / Coders I just wonder is there any script which remove the Graphics Lines and circle represet trade history, during visual test Or is there any option just disable in strategy tester that will not show trade history graphics during visual test pice of code will be helpful, since i...
Has anybody know how to use Active Lock to protect ea and indicatots? Thanks
I have try lots of combinations..Now I found one..If you could donate some token for my effort by putting your comments on my articles.. your can put up lots of comments or questions then i will share the combination for you to try.. i am sure after you have the combination indicators, then you will...
New article The Fundamentals of Testing in MetaTrader 5 is published at mql5.com: What are the differences between the three modes of testing in MetaTrader 5, and what should be particularly looked for? How does the testing of an EA, trading simultaneously on multiple instruments, take place? When...
Hi all here, if some of yours is using an economic calendar for news, what source you will recommend? DailyFX? Forex Factory? Thx for your recommendation, EADeveloper