Expert Advisors and Automated Trading - page 75

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
I have 10 licences for my EA> When I try to install the EA on another laptop and platform, I install it but when I close the platform it removes the EA. It is working on 3 platforms but not on 2
Hello guys, i have trading strategies that i want to implement as EA, im not very good with coding so i try to code with the help of CGPT but when i finish and try it in mt4 and strategy tester, they are nothing happen and strategy tester also shows no result. I didnt know what happen because there
So I've been designing this EA, but I can not seem to get ANYONE who can get backtested News data that I can use in a EA. The goal here would be to somehow get a .txt file of all the news data and proiorty levels back to 2012 or so, to current day. Then use that to alter trading in a backtest on
  Help need!  (2)
Hello everyone, I need help with my EA. I am trying to develop an EA where my indicator will give me a price level to buy when current price cross that price level from below and sell when current price crosses that level from above. The problem here is that the EA keeps placing several trades with
i have some experience in MQL4 and still learning MQL5 language. I understand most basic code conversion MQL4 to MQL5. Recently i learn that there is a MQL5 Wizard to create an EA automatically. Tried to make it create a simple EA to open buy if RSI>80 and sell if RSI<20. It works but i have no idea
Hello, What is the MQL5 equivalent for MarketInfo(_Symbol, MODE_PROFITCALCMODE) please? My goal is to have the type of the symbol (forex, CFD...). I tried the SymbolInfoString(_Symbol,SYMBOL_PATH,path) command, but it doesn't work well with all brokers. Regards, Matthieu