Expert Advisors and Automated Trading - page 83

To post a new topic, please log in or register
There have been similar topics discussed on here but I haven't seen one where this specific question has been fully answered. When using the open prices only method in the strategy tester, if a stop loss and take profit were set on the previous bar, and the market trades at or below the stop loss...
Hello ,  I have buy pro expert from mql5  I have 20 pairs for trades but after 4-5 hours of Metatrader lunch and ea open pending orders is deletng and after 1 second again open then deleted (etc) , the developer also didnot know what is these issue these problem happen for me only :( these expert is...
Hi, I’mmaking an EA that buy or sell if max/min of the last week was broken. What Ido in my other EAs is to check if, for example, the close of the15min penultimate candle is below the last week max and the close ofthe last 15min candle is above. Itworks for day trade with a high volume stock. But...
Hello Everyone.  I would like a function to put before the sendorder, to prevent an expert from opening an order before the price of the previous one is greater than X Pips. Example: Distance = 30 Pips; Open = BUY> Price: 1,001 Signal buy> Price 1.015> Dont open New Signal Buy> Price 1,030> Open,...
Hello everyone, I have a semi-auto EA which will open a new order if the user's manual order open profit >= e.g.10 pip, but the EA did not open the order even though my open order is already profiting +50 pips. Can anyone help and identify what is wrong with the code? Thanks in advance Below are...
Assuming that the backtesting is done at a fixed spread, from date X to date Y, with tick data, and that the platform is not connected to the internet from the start to the end of the tests (to avoid the quote currency exchange rate differential at different points of the test), is there any reason...
Hi everyone, I'm new to this, so here is my question. If you buy a expert advisor only comes with the ex4 or it also comes with the scrips, so that you can change or add more code?
Hello, Testing MQL5 VPS. Is it possible to access via Microsoft remote desktop? I primarily use a Mac, and I access my other VPS VIA Remote Desktop. 
Hi there, I understand that things work a little different in MT5... Here is my understanding: An order results in a deal. A deal effects the net position. StopLoss (SL) and TakeProfit (TP) are on position level. What I need is that, as in MT4, I can set SL and TP based on deal level. Having an open...
I have attach my EA to 5 charts, all different currencies. My question is how to make an EA to check EA on all other charts if have already open an order, before opening a new order? This is to ensure that I'll not blow my account by opening too many orders. FYI, my lotsize will depends on the risk....
hello everyone! & How to code a label object to stay on top of another label objects as will? Please Im new to mql4. Recently, I read alot of object properties in mql articles & searched for solutions on google. unfortunately, I cant find out how to code a label object to stay on top of another...
Hi, I try to create an EA with mql4. I need create a table and then I can update it from time to time. But I don't know how I can create a table and array.  My table is 22x7 matrix. table[state,action] = np.zeros((22,7))   // 22*7 matrix including all elements as zero. And, How can I update this...
In MQL4, I can write: void StringFunc(string &ArrayRes[][]) and it's no compile error, but in MQL5, StringFunc(string &ArrayRes[][]) has this compile error: '[' - invalid index value. How to write multi-dimention array as a function parameter in MQL5? Is there anything changed?
Hi, given that I am using a broker where the ability to place orders via an EA is enabled. I use the ordersend function followed by ordermodify, which handles errors inside the EA and there are no errors in the diary. If I run the EA in test opens positions, while in real no. Example: On the day you...
Hi people! I am still a newbie (35 days) of MQL5, so please be patient. I assembled a simple EA with the Wizard -> Expert Advisor (generate), using intraday time filter (ITF), trailing and fixed trailing volume. However, I want all trades be closed as 16:00, and decided to change the code: void...
How to model slippage with tick data(time, bid, ask)? Is any method to estimate slippage as function of position size , ...? 
Hello, for an expert i try to calculate the CCI by myself. What i wonder, i never get the value from the CCI indicator. Is the iCCI(..) function somethins special to the original calculation of CCI? input int CCI_Periode=8;input int MN=123;input string Text="Trailing";double CCI1[];int...
I purchased an EA but it does not work as shown in the figure. Thank you.
I created a simple EA base on RSI and CCi! Besides, this EA will open order at bar's open price and close order at close price of the same bar or open price of next bar!  However, when i backtest it only work with sell order! Buy order didn't work Pls help me...
Hello. I have been trying multiple ways to do this and read a lot of topics but still cannot get it working.  So I have been trying to make EA that checks for 3 different signals and opens an order once all 3 of them are the same. I run into a problem with the last signal, which is supposed to check...
Hi everyone, I have an EA that I have written that works perfectly 99% of the time. Occasionally though, it will just not process a block of code. When this happens, it almost always follows a change in indicator, the most recent example is a flip in the PSAR value. I know that it is not executing...
Hi Guys, Method Refresh() is called in CIndicators::Refresh(). but the method Refresh() in file Series.mqh is empty, why? please advise. //+------------------------------------------------------------------+ //| Indicators.mqh | //|...
Please kindly suggest a filter i can use to stop my moving average crossover EA from trading in Consolidation, I've tried adding more moving averages and slope calculation as a filter, but its still not enough. During the crossover, the crossovers happen many times back and forth before price starts...
hello dear programmers does anyone know how much a mt4 EA can be fast at its maximum execution or cancellation speed? on the other hand can an EA on mt4 execute an order,placing an order,  close or cancel an order in 1 millisecond? 1 millisecond = 1/1000 second or even 1 micro second = 1/1000000...
So I did some research and found this video on youtube- https://www.youtube.com/watch?v=o4jVeJdYTkM And that got me thinking, what if I could combine all the indicators I use for manual trading into one program. I know python and how it works, but I don't know c so I'm having some trouble...
Hi, this piece of code , always leads to the same error. the ModifyReq is filled just as Trade.mqh is filling it before sending a modification order. // getting position data here.... symbol, TP, ticket...// and all values are checked.// pos_symbol != ""// long pos_ticket = PositionGetInteger...//...
Hello Everyone, So i am using the metaquotes VPS and i have multiple EAs running on multiple charts at the same time. My problem is whenever i want to add an EA with a new chart the server syncs all the information from my mt4 terminal which stops the currently working EAs and deletes all the...
Hello, I have this code for the Trailing Stop of my EA, and it is generating the "OrderModify error 1", can you help me to know what I am doing wrong please? int nbuy()  {   int b0=0;   for(int i=0;i<OrdersTotal();i++)     {      int a1=OrderSelect(i,SELECT_BY_POS...
  Limit volume (13   1 2)
Hello everyone I am having problems with limiting the volume of lots, I would like to know if you can help me please, this is the code to obtain the lot to invest: double GetLots ()   {    double lots = 0;    if (MM)      {       lots = NormalizeDouble (AccountFreeMargin () * Risk / 100 / 1000.0...
I have this code. I want TP to print either 500  or 1000 depending on  the random numbers generated, the problem is only  TP 1000 seems to be printed, I'm sure there is an easy way around this but cant figure it out. Please helint BAH= rand()%5+1; int TakeProfit2=0;  bool BAH2 = (1||2||3);  bool...