Expert Advisors and Automated Trading - page 2

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
Hi Can anyone explain the code ordercloseby to me When I use it to close buy and dell orders it gives me error 3 Thanks
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
  Neural network  (4)
Where can I learn neural network in mql5? Or which book can I use to learn neural network in mql5 or mql4
  Better NN EA  (120   1 2 3 4 5 ... 11 12)
Hi Better has really good EA and is winning the championship Participants - Automated Trading Championship 2007 Profile Better - Automated Trading Championship 2007 What is NN ? Where are the NN threads in this forum? Can anyone here make this EA El cid
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
I have written an EA (in MQL4) to test a strategy which involves placing a buy and sell pending order at the same price on a grid, with target profit, and once the orders are triggered, another pending order of buy and sell is placed at the next level in the direction of travel. I am not a
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
Hi, I created a TrailingStop ea to help to modify stop loss position. After that, my data provider is OANDA, the first position I opened is USDJPY.sml and second position is AUDJPY. However, when I run this ea with the code below, it fails to return second position AUDJPY, for both index 0 and 1, it
I am trying to post a pending Orderasync on a DEMO account but no matter i do the error persist. The symbol specification says Order Expiration : TODAY Here goes my code and tries: bool Trade_OrderAsync( double volume, ENUM_ORDER_TYPE MyOrderType, double Order_Price, double Order_Stop_Loss_Price
While working with multi-currency EAs, most commonly one has a unique EA that is applied over to multiple currencies. In theory, there is an infinite loop, running the same operations over data from multiple currency pairs. While studying how to do this, I came across three alternative suggestions
这是我的代码: // 输入参数 input int MagicNumber= 1 ; // 魔数(MagicNumber) input double Lots= 0.1 ; // 每个订单的交易手数(Lots) input double MaxOrders= 5 ; // 订单总手数上限(MaxOrders) input double StopLoss= 50 ; // 止损点(Take Profit-以点数为单位) input double
  Control the EA  (10)
Hi, can you control your EA so that when it's an uptrend he can only buy and downtrend he can only sell, is there anyone who can do it
Hi there! I´m coding an EA that should place a BuyStop / SellStop order at a specific price and if it doesn't reach this price it should be cancelled after 2 bars (10 min since im using it on M5 timeframe). I tried to do that by setting an expiration time but when I test it on the strategy tester it