Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 652

 
pako:

what parameters are you interested in?

objects are rectangles. Therefore 2 prices and 2 dates with which they are constructed.
 
.roman.:

the objects are rectangles. Therefore 2 prices and 2 dates with which they are constructed.


what prices are they built at? open, clause, high, low?

throw the script.

Files:
test911.ex4  9 kb
 
pako:


At what prices are they built? Open, clause, high, low?

throw the script


The first price is the zigzag local extremum of the timeframe, at which the indicator is operating. The second one is based on the values of two neighboring candles with the extremum. Generally speaking, it will not be possible to calculate (draw) through М30-day, for instance.
 
.roman.:

The first price is the zigzag local extremum of the timeframe on which the indicator operates. The second one is based on the values of the adjacent two candles with the extremum. In general, it will not be possible to calculate (draw) through M30 for example.

Take the data and calculate, where is the problem ?
 
 for(i=shift-1;i>=0;i--)
      arr[i]=arr[i+points];

In strict compilation mode, it gives an error

'i' - undeclared identifier

Please help me fix it

 
nikitasa1997:

In strict compilation mode, it gives an error

'i' - undeclared identifier

Please help me fix it


for(int  i=shift-1;i>=0;i--)
      arr[i]=arr[i+points];
 
nikitasa1997:

In strict compilation mode, it gives an error

'i' - undeclared identifier

Please help me fix it


declare the variable i outside the block, somewhere at the beginning of the function.

See here.

Variable scope and lifetime

 
sergeev:


Thank you very much)
 
realgentleman:

The Debugger doesn't work - what's wrong?

Best wishes to all forum members!

No one has answered my question posed back on page 644. I must have asked it wrong, so I'll ask it again. So,

Metatrader Bild 646, Editor Bild 934. Here is a simple indicator:

I run it on EURUSD, M1, and this is what I get:


I.e. everything is as it should be.

And now I make a breakpoint before Alert and run the Debugger:


USDCHF,H1 chart appears. Where is it coming from? OnlyEURUSD, M1 was open.

I press OK and this is what I see:


I.e. the indicator takes data exactly from this USDCHF,H1. What is the problem here?

The second question. The Editor does not place the written script in the folder Scripts but in the folder MQL4 and places the compiled file there as well. I have to manually drag and drop the source code to Scripts folder, then compile it and the script will appear in Navigator only then. Indicators don't have that problem, they go straight to their folder. Am I doing something wrong or is the Editor making a mistake?

Good luck to whoever answers me.


My debugging doesn't work at all (it doesn't trace). I downloaded MT4 (Alpari) all over again and did nothing else. I don't know if it works in MT4 or not (MT5 works in MT5). I have always been working with such a broker and I have no idea how to use it. I have always been working with this kind of stuff.
 
The way I see it, if an EA works on a new candle opening (there is a check for a new candle appearing in the code), then testing results on the "open prices only" model should be close to results of testing on the "all ticks" model, or am I mistaken?
Reason: