Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1812

 
Tretyakov Rostyslav #:

What is this!!!

NormalizeDouble read it and tell me how you got the comparison in there.


P.S. Do you have no errors at all in your logbook?

(Bid - sl_lev)

counts

<  MarketInfo(Symbol(),MODE_STOPLEVEL)

compares

(Bid - sl_lev) <  MarketInfo(Symbol(),MODE_STOPLEVEL) * Point,Digits)

Gets a value

(NormalizeDouble((Bid - sl_lev) <  MarketInfo(Symbol(),MODE_STOPLEVEL) * Point,Digits))

and returns it to its normal form

 
Tretyakov Rostyslav #:


Where is Makar?

 
Alexander Avksentyev #:

counts

compares

Gets a value

And then it brings it back to its normal form.

Print((NormalizeDouble((Bid - sl_lev) < MarketInfo(Symbol(),MODE_STOPLEVEL) * Point,Digits)));

And see in the logbook what it gets)

 
Alexander Avksentyev #:

counts

compares

Gets a value

And returns it to its normal form.

(Bid - sl_lev) < MarketInfo(Symbol(),MODE_STOPLEVEL) * Point,Digits)

Which value does it get? Yellow or blue?

Popularly:

NormalizeDouble is to normalize a decimal,

and you give a comparison to normalize.

 
Valeriy Yastremskiy #:

Where is Makar?

He's been revealed)
 
Tretyakov Rostyslav #:

Which gets the meaning ? Yellow or blue?

Popular:

NormalizeDouble is to normalize a decimal,

and you give a comparison to normalize.

(Bid - sl_lev)

Price is the SL level

and then

 MarketInfo(Symbol(),MODE_STOPLEVEL) * Point

compares to the allowed minimum SL.

Assumed that further acquires an intelligible form.

If it's not right, then it's wrong.

You want me to normalize what I have calculated, but the information obtained by MarketI is already readable? It will be a normal comparison.

Yes?

 
Alexander Avksentyev #:

Price - SL level

and then

compares with the allowed minimum SL.

Assumed it gets a clear view further on.

If it's not right, then it's wrong.

You want me to normalize what I have calculated, but the information obtained by MarketI is already readable? It will be a normal comparison.

Yes?

No

doubleNormalizeDouble(
doublevalue,

(Bid - sl_lev)

// number to be normalized


intdigits

Digits

// number of digits after decimal point
);

 
Kedrov #:

Hello all!

Please help!

The common_sr indicator shows yesterday's maximum/minimum only today, on the current period. I.e. these levels, boundaries are not shown on yesterday's day - only today. And this is correct!

And the same indicator, showing the maximum/maximum levels of the previous week, draws them in the previous week as well. Although, logically, it should draw only the current week.

I have tried to represent these ideas in the screenshot. If I have any questions, I will give you the answers.

Will you be able to correct it in any way?

Thanks a lot for the help!

Files:
common_sr.mq4  39 kb
 

Alexander Avksentyev #:

Assumed it gets a clearer look from here on out.


double price=NormalizeDouble(Bid - sl_lev,Digits);
if(price < MarketInfo(Symbol(),MODE_STOPLEVEL) * Point) return;
 
Tretyakov Rostyslav #:

Rostislav!

Thank you very much for your concern!

And for the result!

Many thanks!

Good luck!

Reason: