Expert Advisors and Automated Trading - page 68

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
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
can someone help me with adding a function to close open buy position when my two moving averages crossover takes place
@Lorentzos Roussos @Dominik Egert I was just trying to start with Matrix and Vectors, but reading this thread ( https://www.mql5.com/en/forum/448355 ) makes me think again. Tell me frankly man, is it worth to invest time in learning them? The documentation is very poor to explain the correct ways
been working on this inside bar expert advisor and i had issues with it giving continuos non stop alerts but tried to solve it but now it wont compile because of a unbalanced parenthesis on the "void OnTick(){" line 23 in the code below. can you guys please help me balance the parenthesis as i have
Hi I would like to ask some help in my search for the correct tick value. In both MT5 and MT4 the tickvalue is sometimes set in a different currency then the deposit currency. When you place an order and DRAG the order up or down to set TP or SL the "value" is based on deposit currency. See the
I created an AI trading bot in MetaTrader 4 and 5. Implemented a Python script to use the AI model and integrated it with the EA using socket communication. Runs well for one forex pair. Now I want to increase my Forex pairs and trade with more pairs. So, I need to develop several Python scripts for
Hello everyone, I've been trying to create a code to count candles from the last pending order, so that after x candles of the pending order, it automatically cancels. However, I didn't get to the calculation, could someone give me a tip
I used this color codes as input parameters. The I used them to modify object colors . but it does not work. I checked the EAs input menu, all the colors are pre-selected to black. even though correctly declared them. input color Monthly_Resistance = clrCrimson; input color Monthly_Support =
Hello, I'm having trouble finding a good logic to notify me of each Open/Close event. My issue is that sometimes there are multiple Opens or simultaneous Closes, and I would like each one to be correctly notified. I'm thinking of using `ontrade()` - but I'm having trouble using this function
I'm copying a signal using 95% of my deposit and don't copy any other signals on that account. The signal's leverage is 1:300, mine is 1:500. I read the explanation for the calculation of relative lot sizes: https://www.mql5.com/en/forum/215636 Based on that explanation I would expect that the risk
Hello, I'm currently developing a system that initiates trades in the last 5-minute candle of every Monday. Ideally, most of these trades should hit the SL at the opening of the next day if there's been a bearish gap, as the SL is set at the lowest point of the current day. Upon backtesting, I
Hello, I have been trying to validate my EA for two days without success and despite the checks carried out, the tests concluding in real and in demo always the same message: test on EURUSD, H1 there are no commercial operations test on NZDUSD, H1 there are no commercial operations test on