Hi! I'm trying to fill an array in the oninit function, but sometimes when I do the backtesting it gives me critical error because it tells me that I'm dividing by zero. The part that fills the array is as follows: for ( int
Hello! I'm trying to make a system based on 3 SMA. I want to take a trade if all 3 SMA are pointing in the same direction (up or down), but I'm struggling on how to represent that in a code. I thought that it might be a good idea using a % change and
Hi! I'm trying to understand how the s1 and s3 values are calculated in this for loop. How the initial values are calculated? Shouldn't be 0? This is a for loop in the Damiani Volatmeter indicator. for ( int i=loop_size;i>= 0 ;i--) {
Hi all! I'm trying to display in an indicator the current profit level and the % of equity that it represents. Actually, I'm testing it across 17 pairs and it this moment there are open trades on 14 of them, so I would expect to have information
Hi all! I'm trying to build an indicator based in ADX and a MA attached to it. In MT5, when I use iMA I can apply it to a handle. How can I do this in MT4? This is how I'm doing it: for ( int i=rates_total- 14 - 1 ;i>= 0 ;i--)
Hi all, I am recently testing an EA that I developed myself and I found that for some reason, when it closes a position on a pair, it closes all other positions in all other pairs, regardless if the EA is running on that pair. For example, if the EA
Hi all, I have some questions related to multi timeframe EAs. First, when backtesting , is it possible to display both timeframes, as in mt5? If it isn't possible, does this means that the backtesting is not meaningful? On the other hand, I noticed
Hi all, happy Friday. Recently I received a file that goes as follows: "xyz.ex4-1.enc". The person who gave it to me told me that I should put it in my indicator folder. What is an .enc file? Is this dangerous? Best regards, PS
Hi everyone! How can I know the ticket or de ID of a position across multiple pairs? What I want to do is to implement a trailing stop based on the last position that was opened. For example, if the last position is +50 pips, then move the stop
Hello everybody! I hope all of you are doing well! I have some questions that I would appreciate if anyone could answer. 1. Does automated trading really work? I mean, I have seen some eas doing great jobs in backtesting , but is this real? Do
Hi, I was wondering what makes a simulation/optimization fast or slow? I have 8 local agents with this hardware: i7-4700HQ @ 2.40 GHz, 16267MB. I also have installed MT5 in the HDD, because it was consuming like all the space in the SSD. Which
Hi! I was wondering if it is possible to "change the logic" of a strategy to work with OHLC parameters. I'm looking forward this because I have to very different results with the same code on different backtesting modes. So what I understandis that
Hi all! I hope all of you are doing great. I want to distribute risk across various orders, but I don't think I am doing it the right way. Lets say I have a 3000 USD account and the idea is to open 1 micro lot and get to a target profit of 1 USD. If
Hi all!! As funny as the topic might sound, its true. I'm looking for a "master Yoda" thats willing to teach me. I'm pretty new to MQL5 and trading, but I'm full dedicated at this (~15 hrs/day). That huge number of hours a day it's because I needed
Hi all! I want to know how I can place pending orders when the price makes a "double bottom / high". I was looking at the structure of MqlTradeRequest, but there are some things that I do not understand. What is the offset for? I understand that I