Forum

What is the terminal up to between OnInit and OnCalculate?

I've got an indicator that's very similar to other indicators I've written, all of them running super-simple algorithms (90% of the code or more is just about getting the data in) that calculate the slope of another indicator's values between two bars, a simple Y2 - Y1 for a user-selectable period

How do you turn off the automatic populating of variables in the Debug tab of the Metaeditor Toolbox?

This was introduced in a recent update, didn't used to work like this. When I'm debugging, I'm focused on the problem at hand. Filling the screen with variables that are irrelevant to the problem just amounts to noise. I delete all the ones I don't want, but the very next F10 puts them all right

Can't get 2-colored histogram to work, except I already did elsewhere... a little help, please?

I've got two indicators I'm experimenting with, having not plotted a histogram before. The first one works but was just fooling around to make sure I got the color side of things right. The second one is set up just like the first one in the relevant areas, but doesn't work. Code for the one that

Hey MetaQuotes software guys: Please fix this MetaEditor behavior which I consider to be a bug: "View Toolbar" setting keeps getting reset.

NOTE I originally penned this post from memory. It seems, now having double-checked, that I referred to the wrong bar setting. When I did the tests/attempted fixes described below, I'd found the right one, and the actions I took and results I got were as described. I've already spent too much time

Can someone say why the compiler doesn't think these arrays are the right type for CopySeries?

On top of it all, the statements were working fine when I was asking just for close price . As soon as I added time, it started throwing up. 1005 double daNowPrce[]; 1006 datetime dtaNowPrce[]; 1007 ResetLastError (); 1008 1009 double dNowPrce = 0 ; 1010 1011 int

Flummoxed: unless you can find a problem with this code, MQL5 has a serious bug

I have a simple indicator that I use a lot in coding and testing, called BarID. Its intent is: for any bar you point to on a chart, to give you both its AsSeries = true and AsSeries = false index values, along with the best I could do to show its date and time, given all that's available are type

Where can I programmatically get a count of the input parameters of an indicator, custom or otherwise?

It would be awesome, before using IndicatorCreate, to get a total/count of the indicator's input parameters. Where can I get this in MQL5

Someone please add a ".name" and a ".datetime" to MqlParam

It's got type and values, why not let us say that the internal name of the variable is? It would really help in check if we got things out of order, and besides, it's just polite, don't you think? But the real rub here is: What do you do about an indicator you're trying to set up that wants a

Phantom variable, how does it work and where does it go?

This one burned a full three days dogging it. I've been trying to call this iCustom indicator . No matter what I do, it keeps returning zeros -- no data. I've coded these many times before and haven't had a problem. What's been more mind-boggling, the indicator works just fine when added to a chart

Counts don't agree between rates_total and the oldest bar appearing on the chart.

I just wanted an indicator that would give me each bar's index value, to make debugging easier. Simple code is at the bottom of the post. I know rates_total is significantly more than the oldest bar that shows on the chart. What I don't know is whether the chart is just limited to 99998 bars (or