Expert Advisors and Automated Trading - page 17

[Deleted]
How is it that the POSITION_COMMISSION property is not indicated in the documentation on the properties of positions, nor proposed in the code completion in MetaEditor? https://www.mql5.com/en/docs/constants/tradingconstants/positionproperties#enum_position_property_double However, we find the
Hello everyone. Compiling this code I am getting the following error: "function 'Test::test' already defined and has different return type" template<typename any > struct Optional { any value; }; class Test { public: template<typename any > Optional < any > test(); };
double CalculatePoint() { if (Digits == 3 || Digits == 5 ) { return 0.0001 ; } else if (Digits == 2 ) || Digits == 4 ) { return 0.01 ; } return 1.0 ; } Improperly formatted code edited by moderator. Please always use the CODE button (Alt-S) when inserting code
For example, if my model has 200 factors and I've exported an ONNX file using Python, but MQL5 needs to handle the data for all 200 factors, it can be quite cumbersome. Is there a good way to handle this
So i made a strategy wich uses data gathered by me manually , and for this i need my EA to calculate on tuesday morning (3am ) my monday range (high-low) but doing this taking into consideration only the candles printed starting from 3 am (server time) , i tried doing this using a static value by
What's the difference between Every tick and 1 minute OHLC modelling in strategy tester ? Why is it that all strategies that look profitable using 1 minute OHLC modelling went badly if I were to change it to every tick modelling? All of the strategies are in higher time frame, such as 15 min, 1 hr
Hi All. I am unable to figure out this. 1) Step 4: Code - Stuck at 20% Not sure what to do here. I believed my code is compliant with the code standards. Can anyone provide any advise? screen shot link is below, 2) Unable to insert img from codebase and forums. Insert img icon is missing on both
Hi! I have set my strategy back tester to back test a EA against a daily time frame over a year's worth of data. I have checked and Exness is able to provide tick based data for this time frame. One of my conditionals before submitting a long or short trade is to check whether the bid or ask price
The specific idea is as follows: EA has inputs: int countorders= 1 string timeclose = "5:00" double lot = 0.04 ... After running, EA returns a result set of inputs in a file as follows: countorders = 4 timeclose = "7:25" lots = 0.04 ... Start testing again with that input and continue repeating X
Hello all, I have been developing EAs for a little while now and have noticed not every broker or server provides the same amount of data. For example on EURUSD you may be able to get the data from now to 2020 for a 1 hour chart but if you switch brokers you can get the a longer period of data for
Hello Folks, Does anybuddy can tell me, how the CScrollV works? I have a CScrollV in my Panel, an the CScrollV Element packt with dummys. One is allway overlapping down there, but most confusing is: I can not tell, how to get the Entrys move, while scrolling (I can move the ThumbBar) I can not put
Hello, I am seeking a method to get deposit and withdrawal record by code. MT4 and mT5, any idea and experience share ? Many thanks
I know how to publish settings to VPS, but how can I view the settings on the VPS at a later date from within MT5? I know there are journals but is there any easy way to see my EA settings? I have multiple VPS so it would be able to click a button to see the EA settings
I am trying to get my EA working that calls on Open Ai API for chat gpt to make trades automatically based on current price and history. Maybe news too. But i keep getting these errors - Yes i know my API key should not be hardcoded but for testing purposes i have put it in. Also open ai api url is
Hi, I'm working on an indicator which makes the same calculation process for each symbol of an internal list selected by the user (for exemple : EURUSD, USDJPY, etc...). The event which initiate a new calculation process for a given symbol shall be a new tick of this symbol. Important : This...
Hi, I ran an EA on Strategy Tester and it seems like the profit calculated for the trades does not match the lots and the pips. For example, as you can see in the picture there is a trade of 3.84 lots opened at 1.43611 and closed at 1.44403. This results in a profit of 2106.11 according to the...
Hi! I added into my EA that my positions should close on a specific day of the week. I understand that the int values for each day of the week is as follows: Monday = 1 Tuesday = 2 Wednesday = 3 Thursday = 4 Friday = 5 Saturday = 6 Sunday = 0 The code I made is as follows CTrade trade; input double
I am running into an issue, where every time I request the DEAL_ENTRY, only DEAL_ENTRY_IN is returned. This occurs no matter if I am looking at a ticket for the entry of a position vs the ticket for the exit of a position. Based on some research, this may be a bug. If this is correct, what is the
[Deleted]
Hi everyone, after having optimized my EA, the table of the results shows 23% as max drawdown. However, when I run the optimization variant with right click "Run single test", the drawdown is computed to be 87%. What could be the reason for this issue? Is there a way to fix this from my side? Thank
Hello i have a problem running optimization on an EA that i am backtesting. Here's the situation: if i run the optimization assigning 4 EA parameters different values for example moltiplicator from 1.2 to 1.5 tp from 20 to 40 maxorders from 8 to 12 i get a bunch of results. I was thinking that i
Hi Friends I am using an Expert Advisor on a VPS environment, also allowed modifications of settings. But, when try to change the trade lot, it still opens a size other than what I requested. Please advise how to fix the error. Thanks in advance
Hello everyone, I'm running into an issue and was wondering if others have seen this issue. I run lots of automated backtests with these settings in my .ini file that starts the backtest from my Node.js script : // Node.js example testerGroup.addVar( "Visual" , "0" );
I've been seeing strange account data in the strategy tester for the last 5-6 days at the bottom, where account information is displayed. Please see the screenshot. Previously, there was margin data there, such as the free margin percentage. This is regarding the MetaTrader 5 strategy tester. How
Please help me understand: I am running the tester strategy with an expert of the MT5 market on gold with four different brokers Dukascopy, Swissquote, FP-Market and Ava-Trade and I get completely different results. In particular with Swissquote and Dukascopy the result from 01.01.24 to today is
Hi , i am currently testing my algo on XAUUSD , my strategy is based on how the candles close, my entry is done only after the candle is closed , and also my exit rules are as follows: one tp ,one stoploss , and 3 more rules that close the trade based only on how the last candle closes , so for my
I am trying to run my EA on [redacted] tick data but the data quality is only 8% when I run it on 3 or more years of data. Does anyone know a broker that has a similar price action to [redacted] ? How did you resolve this issue? Thank you in advance
Hello guys, I want to send calendar information via API but when I retrieve data as the below code, it returns a number without format, I want to receive the data which is shown on MetaTrader Calendar. Please help me. How can I do? Thanks in advance. void CalendarData() { // Define the array to
I have made a trading bot with python that works with MT5 using the MetaTrader5 module. it fetches data from MT5 to my program and sends back a request for position. now I know that the strategy tester in the MT5 can be used to backtest expert advisors, but I wonder if there is a way to use the
Dear All I am trying to make a code which modifying pending order and open order on the same time, but I am facing an issue I made it to change the pending order, but it is not changing the open order. the code is sending an pending orders ( sell limit, buy limit, buy stop or sell stop ) and it is
Hi I have already done some tests with the metatrader5 successfully, but now always comes the error message :history cache build error. Unfortunately, I have google so far no solution for the problem can find. Does anyone know how to fix the error