Expert Advisors and Automated Trading - page 8

Hi, So i'm trying to build a scalping system that watch the market in 5 minutes timeframe and execute trades based on simple algorithm, until here its all okay (I hope so), but when it comes to lot size its a bit tricky. The formula i calculate lot size is: willingToSpend = accountValue * .01 //
Hi Everyone, It's my first post here. I am not a developer and I tried to ask CHatgpt and different tools for help in creating the code (hopefully I will learn the MQL5 and write on my own some day) . Could you pls help me with checking why I get some syntax errors? I gave up.... initial scope: I
  Roffild's Library  (49   1 2 3 4 5)
https://github.com/Roffild/RoffildLibrary Please do not delete or move this topic.
I need to create a custom Demo version for my EA., so I used the OnTesterInt(); function and update a flag if the EA was loaded to strategy tester. but the code doesn't works as expected. What I did wrong here?. bool OnTeseter = false ; int OnInit () { if ( TimeCurrent () < ExpireTime) // If
static matrixf x_norm2m(SAMPLE_SIZE1, 4 ); // matrix for prices normalize //--- request last bars if (!x_norm2m. CopyRates ( _Symbol , _Period , COPY_RATES_OHLC , 1 ,SAMPLE_SIZE1)) { Print ( "CopyRates error" ); ExtPredictedClass=- 1 ; return ; } // Ahora puedes
Hi, is there an easy way to get the ticket number of a Deal IN knowing a Deal OUT ticket? Given a Deal OUT ticket, how can I get a Deal IN ticket? Thanks
This is a thread for Metaquotes. It's quite weird that the forward test results are not saved anywhere or at least is not displayed to the user under some probably unknown circumstances. If for some reason I need to go back to old tests to get the forward results, I need to run the optimization all
Hi guys would you please guide me that How to get total open positions with a magic number in mql5 ? thanks in advance for you help
I hope someone can help me convert this ea mt4 to mt5. I just want this ea to work on the "anytime" option. The other options do not need to be used
hi I'm using this (from an article): if (!rates. CopyRates ( _Symbol , _Period , COPY_RATES_OHLC , 0 , sample_size)) (but doesnt look like the ones of the docs ; why? int CopyRates ( string symbol_name, // symbol name ENUM_TIMEFRAMES timeframe, // period int
Hi I want to get the symbol name , can I do it with _Symbol or Symbol()? if not, any other way
Hi, when I read sample size, I suppose its the whole sample size, iow the length of the data. Is it the sample size or is it the steps in
hi i want to have a ohlc output from the model, and not sure if what I'm doing is correct, please tell me if I'm doing 0k if I have this input: n_features=x_train.shape[2] n_steps_in, n_steps_out = time_step,4 kernel_reg=l2(0.0001) n_kernel=2 verbose, n_epoch, batch_size = 1, 4000, 256 n_output=2
I want to reset my arrays. so I use ArrayInitialize(); function. the function has different types. but no matter which type I selected it only shows the char type input parameters. why is that?. The array I want to reset is a double type. I have selected the double type. but still shows the char
Hi everybody, I'm experiencing a problem with Metatrader 5 optimizer which I've never encountered before. I don't know since when this is happening. When I run a single test from the optimization result list, sometimes the result is different: different number of trades, profit etc. Here is an
Hey guys! I'm facing a weird issue. I'm using the code available here in this article to test OpenCL capacities. The first time I execute the script everything works fine, as you can see on the log. The second time, however, I get the message "OpenCL not found". What could be happening? Is there a
My Expert Advisor uses some technical indicator (like RSI) for trading. but the EA loads all the indicators that EA use to trade to the chart when it's on strategy tester . I want not to load any indicator on the strategy tester. How can I achieve this
Hi all, is it possible to change color, and font dimension of the text displayed with the COMMENT instruction ? Please help me. thank you
I need some help with this EA don't add SL and TP on live trading but when i use it on strategy tester it works normal sorry if the code is missy I'm just using chatgpt for this the mean EA concept is to open buy and sell position at every new candle Open. Thanks
I have an EA I am working on but I can't get the trailing stop to work. The original stop loss is at the low/high of the candle we will call it Xrange and as price moves away from open I want to trail it by values of X the rules I am looking to implement are: when price moves away from the open
Hello, I am learning to code and came across these 2 functions that calculate the optimal lot size for the order. I tried both of them however, they are both giving me a bigger than supposed lot size sometimes (e.g. returns a 1.5 lot size for a $1000 account) so it's causing an error 134 all the
Is there a way to prevent a pending order from executing when it's hit? For example: when an open buy stop order is triggered, I want to have an "if" statement to then decide if the order is filled or not. I just don't know if there's anywhere to interject the order. Thanks for any guidance
Is there a design form that EA builders use, to get the best design from the person who asks to code his strategy? How should a full detailed request look like, when someone asks a coder to write the code
Hello there, I'm trying to code a collective SL for all the buy positions, that is triggered once that the outcome is a positive collective Profit, and updated just in increasing sense (for buy), decreasing sense (for sell). Of course such procedure relies on the correct evaluation of the positions
Hi, I wrote this simple ea to check for Donchain channels (free indicator in mt5) and moving average crossing and post alerts. The problem is once timeframe is changed manually for analysis, the OnInit() will rerun and variable barsTotal get refreshed to older smaller number. Then the iBar function
hi this error appears: Validation state: Validation completed with errors Errors count 1 Started 2024.04.17 19:37:18 Finished 2024.04.17 19:38:29 Type Expert Advisor test on EURUSD,H1 (netting) PE 0 19:38:21.402 Core 1 2021.02.01 00:00:00 El nombre del símbolo es: EURUSD strategy tester report 128
Hi, I've found 2 method to write a data to csv. The first one is to do it like this, void OnTick () { FileOpen (...); FileWrite (...); FileClose (...); } The other method is like this, int OnInit () { FileOpen (...); } void OnTick () { FileWrite (...); } void
Hi Does mql5 do all that for the market, or do I have to add something to the script? and if so ... how, where is info of this
I use MA50 []; and MA200 []; arrays for my expert advisor. if the EA is 24h in operation, the arrays also fill with Moving average data. so, should I reset these arrays once for a specific period to avoid calculation errors
I have an ea that is not passing inspection for marketplace. Can someone help me fix this