Expert Advisors and Automated Trading - page 292

Hi guys! I'm testing/developing an EA and today was my first time using it live, but demo account yet. Analyzing logs, I found a odd situation and I'm not sure if this is normal or an error: 2018.10.22 09:08:19.257 Experts expert MinhaEstrategia2 (WINZ18,M1) loaded successfully2018.10.22 09:08:21...
Is it  possible to code an ea to take profits  lets say  30 pips, 50 pips and 150 pips. For example, on today's trade, the ea  takes profit at 30 pips, next trade, take profit at 50 pips and the next, 150 pips. Not necessarily in the same order but simply avoiding a single tp value. Anyone can give...
Hi guys, if ( Bid <upper[ 0 ] && Open [ 0 ]>upper[ 0 ] && MA[ 0 ]<MA[ 1 ] ) { Print ( "---------- SELL ------------------" ); for ( int i = PositionsTotal ()- 1 ;i>= 0 ;i--) { if (!position.SelectByIndex(i)) continue ; if (position.Magic()==MagicNumber
Hi all  coders, Im aPhong & new to coding!  Lets say I have a open oder in my terminal & I want to manage it by an EA so that my TP & SL are not limited by brokers like mt4 default right now. Im teaching myself mql but at the moment I don’t know how to code it …but I think we should keep it as...
Hi, I have a question, is it possible to import the actual and previous data of an economic event into my code as a variable? Thanks
Trying to update a product in the market to version 1.1 from 1.0 but automatic validation keeps giving this error even after my terminal updated to the latest version(build 1915). test on EURUSD,H1 (netting) 'MA_Strategies_EA_mt5.ex5' has newer unsupported version, please update your client terminal...
Hi My wish is that I am able to accurately set a take-profit to breakeven when there can be any number of regular market orders and activated limit orders. But this was not going very good on freelancer as this was guessed to be some kind of averaging system that actually made the target prices alot...
Hallo, I dont understand what is wrong this : Here you can see actual value in comment but its different than value of MA-line on chart :( void OnTick() { Comment ("Linear MA = ",MA_Linear()," ","Exponential MA = ",MA_Exponential()); }double MA_Linear(){   double MA_Linear_Array [];...
Need coding help for simple martingale EA. I coded this. Anyone can lend a helping hand to make it work? I need help with: 1. opening 20 martingale orders at this price:Code: Select all extern double entry_order1=1.31999;extern double entry_order2=1.31989;extern double entry_order3=1.31979;extern...
Hello Community, Sorry if this question is an idiotic one, but I am rather new to this whole MQL thing. I am coding a small expert advisor, and would like the following to be achieved:  If any of my buy orders, hits its stop loss, I would like to stop all operations  and jump to next bar, ( I am...
Is that possible to show inputs in the report? google doesn't help much.
Hi everyone I am currently testing the results of an EA and would like to know the spread with which it opens each operation, so I have the idea of adding that data to the comment when opening the operation: "Name of my EA" + "spread". The way I'm doing it is: extern string co = "My custom EA ";...
Hi! I have problem with my code! I want if orderlots >= lotb then it will stop trading and wait for new condition! However it didnt stop and countinute trade until profitable result...
Hi guys, I`ve experienced some strange behaviour. Sometime I got a strange value back from the used indicator within the EA I`m writing. It`s not EMPTY_VALUE and not DBL_MAX. BUY direction new 'SL_FRACTALS' tsl at -858993459
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?
  orders not executed in real  (15   1 2)
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 , ...?