Expert Advisors and Automated Trading - page 60

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
There are different methods for price action, such as Al Brooks, RTM, ICT,... To write an EA in any way, we must first know that style completely so that we can make an EA from it. Learning each and every type of price action style and also trying to make an EA is very time consuming, that's why I
Half of the trades are executed without volume and closed without reaching the take profit or stop loss levels. The trade ticket is not displayed, but on the chart, they appear as a smooth line. #include <Trade\Trade.mqh> CTrade trade; void OnTick () { if ( PositionsTotal () == 0 ) {
Hi, I'ld like to be able to know the number of decimal digits of the minimum volume/step of a symbol, something like _Digits but for volume. So suppose the min volume is "1": VolDigits = 0. Or min volume is "0.45": VolDigits = 2. Searching in the forum I did manage to find another thread about this
Hello, According to documentation of MQL5 (https://www.mql5.com/en/docs/basis/types/typedef) is possible to create new types of variables, as well as the standard definitions of C. So, if I use something like: typedef uchar   uint8;typedef short   int16;typedef int     int32;typedef...
Hey all, I was wondering whether there is any way to work with the .tst history files located in the Tester\Cache directory? I'm looking for extracting some information from them, but they seem to have a proprietary binary format. Thanks in advance
My bot is not executing trades, please I need your help on this guys. See my code below: void OnTick () { // Calculate moving averages fastMA = iMA ( Symbol (), PERIOD_CURRENT , fastLength, 0 , MODE_SMA , PRICE_CLOSE ); mediumMA = iMA ( Symbol (), PERIOD_CURRENT , mediumLength, 0 , MODE_SMA
I need help with the code below. Apparently it's not as functional as I want. After all I did it can only open a trade before stopping, I just want it to double the Tp and SL when the trade hit Sl and back to normal when it hits Takeprofit //---------------------------------+ #include
Dear all, I am a freshman in trading, and am in the stage in which I am trying to learn as much theory as I can and am, at the same time, developing "experts" in MT5, which I test and tune on historical data for selected instruments, with MT5's Strategy Tester. I would really like to know if trading
Hi, I am developing a robot that trades 28 pairs, it would be necessary to add a correlation filter. Do you know any bot with a correlation filter? to take it as an example Or which formula this filter use, how to give input to programmer
Hi I am trying to create a function that will determine the amount of points a position needs to move to hit a break even based on the commission charged by my broker plus an extra amount of the account currency. But I can't get the math right... Here is the code I am using followed by the result in
Hi! Which is the fastest way of getting the current price? Option 1: double close[]; if (CopyClose(_Symbol,PERIOD_CURRENT,0,1,close) > 0) Option 2: if (SymbolInfoDouble(_Symbol,SYMBOL_LAST)) Option 3: if (SymbolInfoTick) Some other option 4 I would bet in Option 2, but I'm asking just to be sure. :)
Hello, I have created a new symbol in Metatrader 5 and managed to consolidate charts with different timeframes under a single symbol for a neat presentation. However, I'm encountering irregular gaps when conducting backtests. It seems to only include the beginnings and endings of months in the
any help or recommendation would be great. I have the EA on MT4 but need it on mt5. can anyone convert it or write a simple code
Hello all, I want to implement advisor which uses ema50 & ema200 of 30m time frame along with Stochastic oscillator of 1m time frame example: ema50 & ema200 above current price & Stochastic main and signal above 80 how could this be synced together ? here is my code currenty: double
I have been having a lot of difficulty trying to write the code needed to close all of the positions I am in if a certain signal appears . Here is the code that I have within my method: string symbol = Symbol (); ulong deviation = ULONG_MAX ; if (PositionClose(symbol, deviation){ Print
Hello, I am running into an issue where the profits showing in my "Optimizations Results" from a All Market Watch symbol test do not match the results of running a Single Test from one of the individual tickers. See below for my settings I am using on a "All Market Watch symbol" test for the sake of