Forum

MathSrand, version 5 build 5260 and generating random EA magics.

Hello All, I have just received version 5 build 5260. I have for the past three years and continue to generate my EA magic numbers auto magically with the following code: /* make_long_random() * * Make a big 64 bit random number * Typical uses? create a random EA magic number. * * Parameters: None *

Latest MetaTrader upgrade: Operator not behaving as expected...

Hello All, With the latest MT5 update, I am hitting something I don't understand; a little script to illustrate the compiler warning am hitting: #include <Internal\TimeSpan\TimeSpan.mqh> /* Note: from <Internal\TimeSpanTimeSpan.mqh>: void operator=(const TimeSpan &t) {

Displaying indicator created within EA (iCustom) on chart...

Hello All, As an example, I'd like to display an indicator created by an EA on the parent chart. I can do this using the below code, I worked this out with a little help from Google and on line help, so you'll probably recognise the code (ish). Here is my open code: /* open_indicator() * *

Exposing Fast & Slow EMA in the standard shipped MACD example...

Hello All, I want to make a straightforward change to the example shipped MACD to expose the Fast & slow EMA's as lines in the same window as the histogram & signal. The standard shipped example MACD (attached) exposes the histogram & signal in a separate window. I can build it, it works - all good

Retrieve highest bar value for a period...

Hello All, Edited: Looks like I have cracked this, code below - but constructive enhancements/comments are welcome. I am trying to retrieve the highest value from the highest bar within a given period. If I specify from 03:00 to 06:00 what I get back are prices for close to now (say 11:00). What I