[Deleted]
there have a mistake in an code example at https://www.mql5.com/en/docs/event_handlers/onchartevent
(1)
original code:Print("Launched the EA ",MQLInfoString(MQL5_PROGRAM_NAME)); should be:Print("Launched the EA ",MQLInfoString(MQL_PROGRAM_NAME));
Hi all, I am attempting to modify my TP after placing a trade. The problem seems to be that i am using the same stop loss. This is what i Want. However, if i put in a new Sl by subtracting .00001 from the prev stop loss, it works. I am assuming that positionModify wants new values. How can i only
I'd like to know more about the actual algorithms (code)used to generate ticks in the backtester . The description in the Help file for the option to generate ticks using OHLC values is clear enough, but I have questions about the other two methods: * Randomly by Real Volume. Can I assume that
Hello. When I start debugging with historical data from MetaEditor, it changes my EA's input parameters and I can't figure out where can I set those? These are not the defaults and they are not what I set in strategy tester before starting the debugging
int OnInit () { //--- Newbar(); ma_Handle= iMA ( _Symbol , PERIOD_CURRENT ,maPeriod, 0 , MODE_SMA ,rsi); rsi= iRSI ( _Symbol , PERIOD_CURRENT , 7 , PRICE_CLOSE ); stocha= iStochastic ( _Symbol , PERIOD_CURRENT , 13 , 3 , 3 , MODE_SMA , STO_CLOSECLOSE ); ChartIndicatorAdd ( 0 , 1 ,rsi);
Hi, attached is my simple function to breakeven stoploss after price reaches certain profits on that pair. It is working on all the forex pairs i have tested but, not working on other pairs like indices and cryptos. Im trying to figure out how do i amend my code for this but cant really find much at
Hi, I've experiencing a virtual hosting error with code 1003. I looked in the web and found nothing about virtual hosting error code. Anyone can explain to me about the virtual hosting error
int cntBuy = 0 ; int cntSell = 0 ; void OnTick (){ Comment ( "\n\n\n\n\n" + "Buy Count : " , cntBuy, "\n" , "Sell Count : " , cntSell, "\n" ); cntBuy = 0 ; cntSell = 0 ; // initialize counts for ( int i = PositionsTotal () - 1 ; i >= 0 ; i--){
ObjectSetText(labelName, "text to display" , 10 , "Arial" , text_color); The above line of code is giving me the following errors: 'ObjectSetText' - undeclared identifier ',' - unexpected token 'labelName' - some operator expected ',' - unexpected token ',' - unexpected token ',' - unexpected token
Good day, I got this error when running optimization , but this error does not occur when I run single test . This error did not affect the test results, but after a few thousand passes my log file was stuffed to tens of GB of data, which is very irritating. I wrote the MACD indicator using Custom
My EA is created with the idea that it should execute a buy order when the current price goes below the lower band and a sell order when the current price crosses above the upper band. But he doesn't react as he wishes. At first he carried out orders but now nothing I review the code but I don't
I will do optimization test for my expert but it will be from 1974 .. it will take long i know.. so i will buy new laptop.. so which specifications do you advise me to buy .. for example i will buy laptop by core i9 gen13 ram 64..etc
Hello MQL5 community, I'm curious about the potential impact of the operating system architecture (64-bit vs. 32-bit) on the performance and operation of Expert Advisors (EAs). Specifically: Does the nature of the operating system (64-bit or 32-bit) affect the operation of EAs developed in MQL4 and
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
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
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
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}
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
If you do not have an account, please register
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.