Forum

Trying to get correct history data in my indicator

Hello, a function of my indicator is to get history data and visualize the information of the History tab of MT5 to make it easier for me. The thing is that after some tries I realized I was getting double the number of positions that I had in the MT5 history tab. although I was getting the correct

Problems understanding leaked memory

Hello, I've been making an indicator and I see this issue in the Experts tab of X undeleted dynamic objects found: x objects of class A... So after reading some posts and this article https://www.mql5.com/en/articles/28 I still don't understand how it works. From my understanding if I don't use

Trades placed with CTrade returning always 0 for the Result variables

Hi, I'm trying for the first time this class and followed this guide https://www.mql5.com/en/articles/481 . Problem is that after placing the order I need to get the ticket because I'm trying to manage the operations by myself. The problem is that even the operation is placed and it has a ticket, a

Setting the OBJPROP_TIMEFRAMES of a label unselects a random line in the chart

Hello, I know it sounds strange but after a lot of time stuck with this problem I'm starting to get a little crazy. The thing is I am trying to do an EA to make size positions. Right now, I am in the step of creating the different HLines of the order before creating it. This is done in an indicator

Is there a way to make a chart not do anything by default(draw bars, calculations, etc.)?

Hello, I want to have a chart with an indicator that will only display information that I give. So, for efficiency purposes I would like to know if there is a way to "kill" that chart and only respond to my functions. That way, it won't have to calculate anything nor draw anything except when I

Doubt about ChartSymbol() comparison

Hello, refactoring my code I've found a place where instead of comparing two symbols with StringCompare, I was doing == of both ChartSymbol(chartID). Suposedly ChartSymbol() returns a string and when comparing two strings if == is used, only returns true if both string are pointing to the same

ObjectGetInteger() not getting the information correctly

Hello, I've been all morning stuck with this problem. My indicator has a function to draw a rectangle label and a label so it shows a label with background. The problem comes that when I use the ObjectGetInteger to get the xSize of the label to apply it to the rectangle label it doesn't work. Tried

Can't get if the visible timeframes from an object is the same as the current one correctly

Hello, recently I starting coding my own indicator and I'm stuck so I decided to post here as this site is where I got all the information and answers before by looking to other users questions. But now I can't find one solution in this forum that works for me and I would like to understand why is