Pedro Severin
Pedro Severin
Pedro Severin
Added topic How can I code that a moving average is pointing in any direction?
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
Pedro Severin
Added topic Can someone explain me how this inicial values are calculated?
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--)    {
Pedro Severin
Added topic Profits per currency pair indicator
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
Pedro Severin
Added topic How to apply an iMA to a handle?
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--)
Pedro Severin
Added topic EA is closing trades of other EA
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
Pedro Severin
Added topic Multi timeframe EA needs to be switched manually after taking trades?
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
Pedro Severin
Added topic What's an .enc file?
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
Pedro Severin
Added topic How can I know the ticket or ID of a position?
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
Pedro Severin
Added topic Looking for opinions and recommendations
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
Pedro Severin
Added topic What is the aspects that makes an agent fast or slow?
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
Pedro Severin
Added topic Is it possible to "change" the logic of a strategy to OHLC?
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
Pedro Severin
Added topic Risk distributed across various orders
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
Pedro Severin
Added topic Looking for Yoda
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
Pedro Severin
Added topic How to place pending orders?
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
Pedro Severin
Registered at MQL5.community
12