Expert Advisors and Automated Trading - page 126

Greetings, I'm studying MQL4 and MQL5 for a few years now (I'm not a professional programmer, I'm self educated), but I find hard to understand topics still. Recently, I wanted to store chart object data from a sqlite database to a multi-dimensional array in a project, to minimize disk I/O. As far
Hi all, I am trying to test an EA where it starts each week and see the different results I get. Here is the code (removed all code not related to that matter), it works fine for the first 54 passes and stopped on 1 January 2023. Any idea why? I set the input NumberWeekTest in the Fast genetic from
Hi, I think it would be quite interesting to see the outcome of Martingale- or Grid-EAs which were optimized by Atrificial Intellingence and or neural networks . As for Martingale- or Grid-EAsthe the crash risk is very high - I would like to know what the AI or an NN would tell us. Does anybody know
Hi, I have added 3 handle EMA in my EA. When I'm backtesting this EA, the Strategy Tester it's plotting on the graph (as you can see in the image attached): 1. 3 x EMA red lines. Why ? I haven't coded to plot those 3 EMA. 2. Bollinger Bands lines. Why ? I didn't created a handle for Bollinger Bands
int Ticket_ProfitPoint( ulong ticket) { if (!PositionInfo.SelectByTicket(ticket)) return ( 0 ); double profit = PositionInfo.Profit(); double volume = PositionInfo.Volume(); double tickvalue = SymbolInfoDouble (PositionInfo. Symbol (), SYMBOL_TRADE_TICK_VALUE ); return (( int )(profit
Hello I want use ECN mode for trading I programming a robot for auto trader If in strategy tester I use every tick , my profit will be 12$ But if I use every tick based on real ticks , my profit will be -3$ Why?! And which is better and close to real market? Thank you
Hello , please help me solve this issue with mt5 tester and EA . I wanted to test RecursiveMA indicator , so I created EA to implement one specific method of backtesting for indicators , but there are some issues with pulled indicator values , they are different from what indicator is showing and
hello, What I want to code is as follow: 1> calculate RSI on (14 period close) 2> calculate EMA 9 on (RSI value) i have try so many times but unable to solve. *** But it shows an error that is "Invalid Array Access ". here is my code: double vwap, ema, ema_1, wma, rsi, rsi_1; double rsi_array[]
hi, my experience level is: ive made a few simple ea...for loops/if else/positiongetinteger/trade.mqh. things like that ive been able to open a buy position and a sell position at the same time on the same currency pair. what im having difficulty with is analyzing both positions at the same time. i
//+------------------------------------------------------------------+ //| Comprar na Resistência / Vender na Suporte.mq5 | //| | //| | //+------------------------------------------------------------------+
Good evening forum, Below, I have the start of my code for a London Breakout EA which triggers at 8am (London Start). It calculates the dailyResistance and dailySupport from the Asian Session from 12am - 8am. What I would like to do is draw a rectangle on my chart for this area (12am-8am, High-Low)
I'm working on a script and it uses a form of martingale based on how many positions are open. The only problem is the code isn't working correctly. I've double checked it a million times but it just doesn't work correctly. Basically I'm trying to check if its buy or sell then count up each buy and
I wanted to evolve one of my indicators into an EA just to see if it would be possible. My indicator makes one bool variable turn true when a certain condition is met in OnCalculate, and makes another bool variable turn true with another condition is met. I wanted to use these boolean values for
Hey This is my MQL5 code which I have this strange error when using WindowHandle #include <WinUser32.mqh> #import "wininet.dll" #import "user32.dll" int GetAncestor( int , int ); int GetLastActivePopup( int ); int GetDlgItem( int , int ); int GetParent( int hWnd); #import #include <WinUser32.mqh>
How can I backtest a spread as if it were in real time
Hello I was wondering what the best hardware setup was for optimization using a core-farm? The options would be buying a series of new mini-pcs... 8-cores each with 32-64gb RAM each...about 3ghz new-generation processors. Getting 2-4 of them... Or buying a couple 5-10 year old used rack servers or
I have created a trading robot but when I backtest it, it run well but without placing trades. On the journal report I see the message that says that cloud servers switched off and sometime the report shows that the maximum spread is exceeded, sometimes it says the volume is exceeded. I don't know
Hi. I have created an expert that makes many transactions daily. Now I want to improve its performance. I want to write a script that calculates how much the profit would have been if that expert had not traded between 16:00 and 20:00 (Iranian local time). Unfortunately, there is no command in the
Hey Community, how can i deactivate or delete the Trade-Arrows from deals(opend & closed Trades) inside the Strategy Tester when I am in visual mode testing an EA. Until now, I have no working solution to get rid of Sell and Buy arrows that are produced by the EA. Thanks
string symbol = Symbol (); ulong deviation = ULONG_MAX ; if (PositionClose(symbol, deviation){ Print ("Position for symbol ", symbol, " closed successfully"); } else { Print ("Error closing position for symbol ", symbol, ". Error code:", GetLastError ());
Hi dear community, i would like to assist me in finding if anything is wrong with my code. I'm coding a MACD EA, basically it works how it supposed to be (the Logic), but when you test it, you realize that some signals are being ignored. To be precise, 80% of the MACD signals are well trades
Hey, im working in my own ea, and i would like to find out, what is best practise if i want have demo available and paid version on market, my stage is on dev, so i want to prepare for mql team verifications etc
Can a remote server send data to my Expert advisor throughout socket so the EA can react to it asynchronously? I mean, I want my EA working normally and do something only when some data is received in the socket channel. I don´t believe it is possible because it seems to me it uses only one thread
Hi, im developing a simple ema cross strategy. Ema1 (fast): from 1 to 100 Ema2 (slow) from 2 to 1000 In some cases, fast ema will get 99 as value, and slow could have same value, or lower. That is useless... how can I say to the strategy tester something like: If (fast >= slow) { skip
When I use the backtest strategy on MT5 i just want the results of TP AND SL. It is giving me SO 27.77% AND END OF TEST ALL FOR THE SAME DATE AND TIME? The number should never be able to be that high either with the sl at atr x 2 and the tp at 20 pips. How do I sort this ? Thanks Below is the code
Hi A few months ago, I made an expert that can simultaneously update 1000 Renko charts that I have already made without any problems. But for several days I have been facing an unknown error that the candles inside the chart are erased and I don't know where the problem comes from. When I start it
Hi, I am making an EA where you place the stop loss (for example, 50 EUR), where you want with double click on chart , and it automatically calculates lot size and open a market position. Is there some universal mathematical equation to calculate risk based on my currency, that uses volume of the
Hi , I am trying to add in ATR to my code. I have RSI, ADX and Choppiness working on the backtest strategy for MT5. When I test with mt5 no trades happen although there says there is no errors with the code on mql5. How do I fix the below code so that the ATR calculates the SL automatically for each
Hello, I cannot attach the ' Requirements Specification' to my Bot Order . What Format should it be in ? How to attach it ? Thanks
//+------------------------------------------------------------------+ //| ATR Auto SL/TP | //| Copyright 2023, Your Name or Company | //+------------------------------------------------------------------+ #property