Where to start? - page 8

 

Thank you. From the guidebook I have read it already. I'll read the article now.

I understand how links technically apply but I missed what they're for in the first place. What's the analogue in the mathematical sense or real world? Is it some kind of shortcut in Windows? Because all other data types are associative to me. And links and pointers haven't worked yet (Aha!). It's like something artificial.

It's not a matter of principle. It's just the way I remember better if there's an interpretation of the object rather than just a fact.

In MQL5, the parameters of simple types can be passed by value or by reference, while the parameters of complex types are always passed by reference. The ampersand & sign is inserted before the parameter name to indicate to the compiler that the parameter must be passed by reference.

Anyway, I'm not sure what "passing of a parameter by reference" means. The parameter is read and then modified by the algorithm, how is it by reference? What's the difference by reference or not? And why is it necessary for complex types? Is it an axiom or is it related to something?
Suppose you need only to read a variable and prohibit its modification, you need to use the const modifier for this, but "reading" itself depends on whether it is by reference or directly?

 
perepel:


Is it something like a shortcut in Windows?

so be it.

And why is it necessary for complex types?

So that you don't have to drag large chunks of memory through functions.

It is enough just to pass an 8-byte address (4 bytes in 32-bit systems) instead of all the crap that takes the passed object/array etc.

+ When you manipulate an object in a function, you change the object that was passed to that function.

The const modifier allows you to control and prevent changes. (you can read it, you can't change it)

------

Anyway, theory and books are not the right place to see and understand how links and pointers work.

open MQL and practice with the examples in the help. it will be more useful.

 
sergeev:

Let it be this way.

I want to create an indicator that will not drag large memory chunks across functions.

It's enough just to pass the 8-byte address (4 bytes on 32bit systems) instead of all the crap that takes up the passed object/array etc.

+ The const modifier will allow you to control and prevent changes from being made.

The const modifier allows you to control and prevent changes. (you can read it, you can't change it)

------

Anyway - theory and books are not the place to see and understand how links and pointers work.

open MQL and practice with the examples in the help. it will be more useful.

Thanks. So, if we had a lot of memory, we wouldn't need links, the array would be referenced like int or float directly, while a link is just a means to make life easier for a computer.

As for trying MQL, that's exactly what I'm doing)). I just want to check if I understand what I'm doing correctly.

I also don't understand class destructors and constructors, but I'm not going to ask them now, I am playing with creation of indicators now.

Документация по MQL5: Основы языка / Типы данных / Структуры и классы
Документация по MQL5: Основы языка / Типы данных / Структуры и классы
  • www.mql5.com
Основы языка / Типы данных / Структуры и классы - Документация по MQL5
 

In general, I need to start from a sine wave and deal with DAB and commission.

The platform is easy to use, but I want to understand how the tester takes into account floating spread(DAB) and slippage, is it possible to regulate them?

As I understand the spread is taken from the quotes of a brokerage company and in the expert's test it substitutes floating values. If I'm wrong I cannot understand where exactly it is and how it is calculated from the difference of spread and commission.

A bit confused, gentlemen ... One more clarification: If they say that the commission is 10$ for a "full circle", am I right to understand that it's the same as adding 10 more points to the spread, that is, if spread is 20 points and the commission is 10 more, then in each position I need to raise more than 30 points to be without losses?


 

perepel:

...it's like adding 10 more points to the spread...

Yeah, like everything adds up, or rather subtracts. And the dub and the spread and the minus and the plus sometimes too, it all goes downhill until it's all over Uncle Kolya. A couple of times, and then teach it to others, or go back to being a longshoreman, a security guard, a rubbish man.

What's that picture? Are you kidding me? That could be taken as a personal insult.

 
Alex_Bondar:

Yeah, like everything adds up, or rather subtracts. And the dub and the spread and the minus and the plus, too, sometimes it all rolls around until it's all over Uncle Kolya. A couple of times, and then teach it to others, or go back to being a longshoreman, security guard, rubbish man...

Better not to start :)
 
Alex_Bondar:

Yeah, like everything adds up, or rather subtracts. And the dub and the spread and the minus and the plus, too, sometimes it all rolls around until it's all over Uncle Kolya. A couple of times and then teach it to others, or go back to being a longshoreman, a security guard, a rubbish man.

What's that picture? Are you kidding me? It could be taken as a personal insult.

Can you tell me which exchange is already trading trigonometric instruments?

 
ns_k:
I'd better not start :)

I'm so busted I'm on my third day of booze to take the shame away.

I'mnot:

Tell me, on which exchange are trigonometric instruments already traded?

Ask the afta... You'll get an eternal ban for such a creative work.

 
perepel:

Erm... thanks of course, if it's all from the heart... But excuse me, what are you all doing here then???

There are plenty of more fun forums, if the point is just to have fun. With all due respect, but it's very absurd... Grown men sit and talk about nothing... I do not believe it.


Good point :) I do not understand this pessimistic whining either. I still hope that you can make money in the markets, even if it is not easy, and that is why I am on this forum. "As long as the candle burns, as long as the light does not fade."

If there's no hope, then why hang around on this forum... whining at the gates of Eden.

That's my advice to you perepel: if you distrust forex, that they say it's all "kitchen" no problem try your hand at the stock exchanges, maybe there che che che kloputsya.

If you have a lot of money, you can trade bonds on cash accounts. This is a win-win option. You buy bonds: If their value falls, you will get the coupon and the money you invested,

If they go up, you can also make a profit on the exchange rate. Next option: if you decide that the market is not profitable due to its unpredictability, you can try to trade volatility,
It at least always tends to the average. so there are a lot of options. the forex market is great for training because you almost never have to pay for anything.
for example real time quotes... i.e. real time quotes... you will not find a ball like that anywhere else.
 
nowi:
Next option: if you decide that you cannot make money in the market because it is completely unpredictable, try trading volatility,
it will at least always tend towards the average.
If you just trade volatility back to the mean, the reward/risk ratio will not be very good. And shorting volatility is dangerous))
Reason: