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

 
Valeriy Yastremskiy #:

Documentation arrays

And the dynamics are only on the first dimension. The other dimensions are static.

Thanks for the tip

 
ANDREY #:

Thanks for the help. But you give me a link to the information about dynamic arrays in MQL5. I am still mastering MQL4, or with respect to dynamic arrays the code from MQL5 will also be applicable toMQL4?
Thank you
.

The programming language is the same.

The difference is in API and some small details in functions.

 
Artyom Trishkin #:

CArray, and the like - you can make dynamic arrays of any dimension, changeable in any dimension.

It can be done. Initially, if I understand correctly, the dynamics is only on the first dimension in 5 and 4. And the CArray bibloo for 4ka should be looked at.
 
MakarFX #:

Makar thank you not the first time but it worked properly!!!

 
Valeriy Yastremskiy #:
It can be done. Initially, if I understand correctly, the dynamics are only on the first dimension in both 5 and 4. And the CArray library for 4ka should be looked at.

If you wrote 'you can', you can. The libraries are identical.

 
Maxim Kuznetsov #:

the programming language is the same

The trading API and the little nuances in the functions are different.

Thanks for the info

 

Can you tell me if there is a function in modern MQL5 that calculates the margin for 1 lot in an indicator?

I used it for version 4

MarketInfo(Symbol(),MODE_MARGINREQUIRED)

It works well in Expert Advisors

OrderCalcMargin(ORDER_TYPE_BUY,Symbol(),1,SymbolInfoDouble(Symbol(),SYMBOL_ASK),margin)

But what about the indicators? I do not know how to search? Or?

 
Maxim Kuznetsov #:

Use a calculator to see how many attempts it takes for the first repeat value (any of those previously generated) for rand() to occur.

If the number of open orders does not exceed one per 1 millisecond, then the first retry will occur after 49 days or a restart of the OS. No?
 

Hello.

Can you give me a hint, I'm already exhausted.

I'm linking the levels to the buffers in the DPO indicator and the indicator starts to lag.

I'm not sure what to do with it.

Screenshot

 
Сергей #:

Hello.

Can you give me a hint, I'm already exhausted.

I've been using the DPO indicator to bind levels to buffers and it starts to lag.

I can't read the indicator, it just does not show the real time.


See

Reason: