Expert Advisors and Automated Trading - page 75

I am trying to practice my coding EA skills and created an EA around RSI levels. When i try to back test the ea, it opens a position up on RSI level between 50-60 (range) and the example input variables are based on 70 and 30. Is this a coding issue or something to do with the back test / days off
For a while I have been using this .bat script to automate testing on the MT5 strategy tester to optimise my EA. It edits the .ini file for adjust for set file to load, the pair, timeframe and also then loops how many times to do this. Recently I have had an issue where it would do several sets like
Hi, I'm trying a new multicurrency strategy on MT5, I personally wrote the code which opens new trades only if certain conditions are met. The strategy constantly monitors the price of different forex currencies and according to the strategy tester it should have already opened several trades in the
Hello everybody I am new to programming EA and I have been following some videos and so far, I was able to make a strategy run smoothly. I was testing the following: - EMA 1H 34 periods / EMA 1H 8 periods -Alligator M5 (EMA, no shift) Also, I addeded a loop for trailing stop. This was working fine
  Backtesting.  (3)
Hi. Does anyone of you know a way to test EA on M1? I would like the test to be performed only at the times I specify. For example. The EA is to start at 4 p.m. and end after making the set profit or close all open positions at 8 p.m. Thank you in advance for your tips
Hey, i added some input variables to my EA, but now (different to the version before), I can only open an empty Inputs Tab in strategy tester when, the newer version is selected... What to do?
Hello guys, I have a problem when try to use example for vector::Sort at https://www.mql5.com/en/docs/matrix/matrix_manipulations/matrix_sort when I compile it said error that: 'Sort' is not a member of 'vector' type I try some another ways but still don't know the way to use Sort method Can you
I want to calculate a history profit on OnDeInit event handler. This function only runs when backtesting the strategy. My code looks like this, void CStrategy::OnDeInitEvent( string & SymbolArray[], int numberOfTradeableSymbols, TRADE_DIRECTION TradeDirection) { if ( MQLInfoInteger ( MQL_TESTER ))
I have the code of half trend new alert indicator and i want to change one of it's input value InpAmplitude from int to float. The indicator file is shared with this. So please help me for the above as soon as possible
It seems that the autotrade status before an expert or script is attached to chart, is decisive for the runtime of the expert or script and not the status that is set by the user during runtime. The script below should demonstrate this. The prerequisite is that there are one or more positions and
Hello everyone, I am a beginner in EA trading. Today while backtesting a strategy I encountered a problem that I can't understand. the EA program aborts at the point in time on the picture. But at that time there was still about 15000 in the account. The logs are as shown in the picture, can you
hi I have an ONNX model, my inputs where just the close values, and the outputs are predicted, close values. In ONNX it has this shape: input output How do I say in mql5 (for testing purpose), an unknown value? is it -1? because it doesnt work for me
Hi, I'm having trouble with this: ONNX.Price.Prediction.Test.mq5 //--- first index - batch size, second index - series size, third index - number of series (OHLC) const long input_shape[] = { 1 ,SAMPLE_SIZE, 4 }; what is the batch size? from ONNX.Price.Prediction.Test.mq5 from the shared proyect
I have installed an EA and later I deleted the EA, I also turned off auto trading but the bot is still opening trades, can you help me
  Ordersend Error  (3)
Hello friends,how do i fixed Ordersend Error,I am trying to publish my EA in the market center, they are unable to validate it,the error i am getting now is Ordersend Error, please how friends, how do i fixed this
  Invalid volume  (8)
I get this error: failed instant buy 0.05 AUDCAD at 0.97083, close #2 sell 0.05 AUDCAD 0.97620111 [Invalid volume] I do not understand if the invalid volume error is related to opening the position or with closing the position. Before opening positions, I do the following checks to avoid using an
I'm trying to copy the last X ticks from a given currency, but am left with sporadic results. for currency in currency_pairs: server_time = mt5.symbol_info_tick(currency).time ticks = mt5.copy_ticks_from(currency, server_time, 50 , mtmain. COPY_TICKS_INFO ) logging.info(f "{currency}
I'm trying to use a wrapper class to encapsulate the functionality of mql5 generic container classes. But when I try to retrieve a value from the container via a method of the wrapper class the pointer gets invalid. The object in the container still exists and the pointer is still valid in the
Bizarre, reproducible behaviour with Access Violation, related to GET of a webpage, but with a twist. This code snippet is the basic case: // ... more code above ... string webRoot = Webroot(); string licence = GetWebPage(webRoot + "Check/12345678901234567890123456789012/" ); bool isError
Hello, I created an EA with a builder and if I try to change the name of the file or create a copy of it and change its name the EA stops working and in the backtest the result is a decreasing straight line. How is it possible? .__
Hi guys, I have no experience in coding but want to make a simple EA which buys on Bullish Engulfing Candle with TP 40 pips and SL 30 pips as a test. However, there is something wrong with my code and I want some intelligent individual to point out and correct my code please. I am getting this
Sir, I want to Next 30 Candle to Buy or Sell Trades in 1 Minute Chart. Please see this Photo :- https://charts.mql5.com/38/555/eurusd-m1-octa-markets-incorporated.png How to do code it ? I tried it but it doesn't work to Next 30 Candle to Buy or Sell. datetime m_prev_bars = 0 ; bool New_bar() {
Hi there, I am new in all this and while writing an EA, I need to have my own timeseries that I can store some data as history to refer to later in the code. Lets say I have something like this: // some global variables int direction = 0 ; int directionHistory[]; . . // Inside OnInit()
Not sure if this is the right place for this, I'm scripting an EA with multiple calculations and I notice a lot of discrepancies between my manual calculations and the figure MT5 returns (in history, trades, etc). I'm wondering if the scripts truncate numbers at every calculation, round them at
Can anyone tell me how to fix this error? Can anyone help me upload EA to mql5?" Auto-translation applied by moderator
Hi, can someone give a review to my code? It's so long to post in the topic but's just the problem of open parenthesis expected x4. Would be very helpful to me, thanks in advance
Hello everyone! Please is there a more efficient way to open 100 orders at once? I use this for loop but it takes 20seconds to open a trade. What do you think? for ( int i = 0 ; i < 100 ; i++) { trade.Sell( 0.01 , NULL ); }
Hi all, is it possible to display only specific open positions from a specific expert advisor? Say I have two open positions in Dow Jones. The first position has expert number 100 the second position has expert number 200. I want 2 charts, in one of which expert advisor with expert magic ID 100 is
I want to open trade every hour or every 30 min. How it should look on Meta Editor ? Thank you
Good morning to all On the next screen shot a couple of attempts to install Mt5 in a Jupyterlab Notebook from Google Cloud, what Im doing wrong? Does Mt5 library works in JupyterLab? Any ideas or recommendations more than appreciated