Errors, bugs, questions - page 797

 
sergeev:

Is this it?


I have two questions.

- why did you change the calculation from quadruplet in the code?

- What does this indicator show? how to trade on it?

This is it.

- I didn't change it. I've transferred everything one-to-one. Instead of f-i in the code of four, I use the values of previously calculated MA arrays from slow and fast moving averages of OPEN, CLOSE, HIGH, LOW in five, again multiplying by appropriate coefficients of instruments.

For example, the TOTAL code of a four:

if (Symbol() == "EURUSD"){
               OPEN=EUR(Mode,PRICE_OPEN,i,per1,per2)-USD(Mode,PRICE_OPEN,i,per1,per2);
               HIGH=EUR(Mode,PRICE_HIGH,i,per1,per2)-USD(Mode,PRICE_HIGH,i,per1,per2);
               LOW=EUR(Mode,PRICE_LOW,i,per1,per2)-USD(Mode,PRICE_LOW,i,per1,per2);
               CLOSE=EUR(Mode,PRICE_CLOSE,i,per1,per2)-USD(Mode,PRICE_CLOSE,i,per1,per2);
...
 pair[i]=(OPEN+HIGH+LOW+CLOSE)/4;

Here's one of the EUR f-i's I use in fives instead (see below) - immediately calculating the formulas within it. It's all one-to-one:

double EUR(int Mode, int Price, int i, int per1, int per2){
   return(
            (iMA("EURUSD",0,per2,0,Mode,Price,i)-
            iMA("EURUSD",0,per1,0,Mode,Price,i))*10000*kUSD
            +
            (iMA("EURGBP",0,per2,0,Mode,Price,i)-
            iMA("EURGBP",0,per1,0,Mode,Price,i))*10000*kGBP
            +
            (iMA("EURJPY",0,per2,0,Mode,Price,i)-
            iMA("EURJPY",0,per1,0,Mode,Price,i))*100*kJPY
          ); 

In five this calculation will be like this - without functions, as in four, but directly on previously calculated arrays:

if (Symbol() == "EURUSD")
        {     
// ----  OPEN=EUR(Mode,PRICE_OPEN,i,per1,per2)-USD(Mode,PRICE_OPEN,i,per1,per2);          
         OPEN=((OPEN_F_EURUSD[i]-OPEN_S_EURUSD[i])*10000*kUSD+(OPEN_F_EURGBP[i]-OPEN_S_EURGBP[i])*10000*kGBP+(OPEN_F_EURJPY[i]-OPEN_S_EURJPY[i])*100*kJPY -
               (OPEN_S_EURUSD[i]-OPEN_F_EURUSD[i])*10000*kEUR+(OPEN_S_GBPUSD[i]-OPEN_F_GBPUSD[i])*10000*kGBP+(OPEN_F_USDJPY[i]-OPEN_S_USDJPY[i])*100*kJPY);
               
// ----  HIGH=EUR(Mode,PRICE_HIGH,i,per1,per2)-USD(Mode,PRICE_HIGH,i,per1,per2);              
         HIGH=((HIGH_F_EURUSD[i]-HIGH_S_EURUSD[i])*10000*kUSD+(HIGH_F_EURGBP[i]-HIGH_S_EURGBP[i])*10000*kGBP+(HIGH_F_EURJPY[i]-HIGH_S_EURJPY[i])*100*kJPY -
               (HIGH_S_EURUSD[i]-HIGH_F_EURUSD[i])*10000*kEUR+(HIGH_S_GBPUSD[i]-HIGH_F_GBPUSD[i])*10000*kGBP+(HIGH_F_USDJPY[i]-HIGH_S_USDJPY[i])*100*kJPY);
               
// ----  LOW=EUR(Mode,PRICE_LOW,i,per1,per2)-USD(Mode,PRICE_LOW,i,per1,per2);
         LOW=((LOW_F_EURUSD[i]-LOW_S_EURUSD[i])*10000*kUSD+(LOW_F_EURGBP[i]-LOW_S_EURGBP[i])*10000*kGBP+(LOW_F_EURJPY[i]-LOW_S_EURJPY[i])*100*kJPY -
               (LOW_S_EURUSD[i]-LOW_F_EURUSD[i])*10000*kEUR+(LOW_S_GBPUSD[i]-LOW_F_GBPUSD[i])*10000*kGBP+(LOW_F_USDJPY[i]-LOW_S_USDJPY[i])*100*kJPY);
               
// ---   CLOSE=EUR(Mode,PRICE_CLOSE,i,per1,per2)-USD(Mode,PRICE_CLOSE,i,per1,per2);
         CLOSE=((CLOSE_F_EURUSD[i]-CLOSE_S_EURUSD[i])*10000*kUSD+(CLOSE_F_EURGBP[i]-CLOSE_S_EURGBP[i])*10000*kGBP+(CLOSE_F_EURJPY[i]-CLOSE_S_EURJPY[i])*100*kJPY -
               (CLOSE_S_EURUSD[i]-CLOSE_F_EURUSD[i])*10000*kEUR+(CLOSE_S_GBPUSD[i]-CLOSE_F_GBPUSD[i])*10000*kGBP+(CLOSE_F_USDJPY[i]-CLOSE_S_USDJPY[i])*100*kJPY);
         }
      
      pair[i]=(OPEN+HIGH+LOW+CLOSE)/4;    

- The cumulative effect of movements of several symbols, the differences of fast and slow MA of OPEN, HIGH, LOW, CLOSE symbols are taken. They are added together and divided by four taking into account the coefficients of multipliers of differences of fast and slow MA of the instruments that are also subject to optimization.

To trade: 1. by crossing the zero line + Different (distance from zero to filter false entries) from bottom to top, then to buy, from top to bottom, then to sell. See Expert Advisor in the trailer.

2. on inflections of the line: if there is an inflection below zero, then buy, if there is an inflection above zero of this cumulative MA instrument difference line, then sell (this option is not available in the EA yet).

I want to use either the first or the second option in the Championship.

Files:
 

Incorrect chart display (Bars Mode).

When the terminal is started, the display of the indicator buffer symbols is significantly offset in relation to the images of the bars to which they relate.

build 687

Also in visualization mode, when a chart is moving, the indicator buffer symbols are moving behind the corresponding bars with a very strong and visible lag.

 
R0MAN:

- I didn't change it. I transferred everything one-to-one.

Your result is not the same.

I don't understand why you always bundle mqh

. I've fixed the code in order. I've added two classes

CSeries - a class that serves 4 arrays and 4 buffers + they are defined in INDICATOR_CALCULATION
CPair - a class that serves two CSeries - Fast and Slow.

And functions USD/JPY/EUR/GBP + start transferred as in MT4


I compared results with MT4 - one-to-one - coincide completely

Beer on the house :)


I want to use either the first or the second option on the Championship.

Do you have any profitable results?

Files:
 

and this is the kind of indicator you were originally trying to do

Files:
 
sergeev:

1. your results do not match.

I don't know why you always have mqh in your kit.

Anyway, I've cleaned up the code. I've added two classes

CSeries - a class, that serves 4 arrays and 4 buffers + they are defined in INDICATOR_CALCULATION
CPair - a class that serves two CSeries - Fast and Slow.

And functions USD/JPY/EUR/GBP + start shifted as in MT4


2. I compared the results with MT4 - one-to-one - they are identical.

Beer on the house :)

3. Do you have any profitable results?


1. Oh! Thank you from the bottom of my heart! Haven't looked at it yet. Is it iCustom - is it amenable?

Not an owl on a five. I've had this indica for ages - in the archive.

2. Surgeon with his MASD - inspired! He's giving all neuro-multi-spectra-ultra-ul ultras with his 11 trades. :-)

That's the way he usually is. Now, if the iCustom suits my needs, I'll put the signals into owls and go nuts!

3. While there's no owl on the heel... Does it lend itself to iCustom? - I need its values on the first, second, third bar (for coding two conditions for entering the market: zero crossing and (or) inflection point above/below zero).

4. "You owe me a beer :-) + wrote in a personal message.

 
R0MAN:

3. While there is no owl on the heel... Does it lend itself to iCustom? - need its values from the first, second, third bar (for coding two market entry conditions : zero crossing and (or) inflection point above/below zero).

everything is fed to the iCustom.
 
Rosh:
Debugging is not available in the tester
Are there any plans? Online debugging is of little use due to unreproducible conditions.
 
Remind me, how can I get an indicator to automatically show up in the chart window, which is opened after running in the tester? I don't think I needed to do anything before.
 
marketeer:
On-line debugging is of little use because the conditions are unreproducible.

There's a letter like that. It's big and bold.

Are there any plans?

I don't think MetaQuotes has any enthusiasm for crossing a tester with a debugger, which is understandable - the task is crooked as hell.

Ideas about"virtual server" wander around - it's closer to reality, especially if the input of arbitrary data (with arbitrary speed) is allowed. But it's also an option which puts a lot of stress on metaquotes (apparently, for several reasons at once).

But more ways are possible. Something third. Something like a "microtester" right in the debugger. We set a pair, specify breakpoints, launch it and voila. Run it through the debugger. With stops at breakpoints and possibility to step-by-step investigate and start "further", up to completion of "debugging period".

So-so.

// But this is all my speculation/thoughts out loud. Maybe Stringo will come up with something else.

But something has to be done, that's for sure.

 

MetaDriver:

There are some ideas floating around about "virtual server" - it's closer to reality, especially if you allow arbitrary data input (at arbitrary speed). But it's also an option that puts a lot of strain on the meta-quotes (apparently, for several reasons at once).

Ouch something seems to me that a tester with debugging would be more realistic, and one shouldn't even dream in this direction.

Reason: