[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 526

 
artmedia70:
if (NormalizeDouble(OrderClosePrice()-OrderTakeProfit(), Digits)<0.5*Point)
Can I ask what this comparison means? What is the result of subtracting the take profit value from the closing price compared to?
 
tol64:
Can I ask what this comparison means? What is the result of subtracting Take Profit from the close price?

Practically zero... :) You could do that:

if (NormalizeDouble(OrderClosePrice()-OrderTakeProfit(), Digits)==0)

All this is a right comparison of real numbers on their equality...

 
artmedia70:

Practically zero... :) You could do that:

All this is a proper comparison of real numbers for their equality...


There are so many options for achieving the same result that sometimes you don't even know which one to choose.)
 
tol64:

There are so many options for achieving the same result that sometimes you don't know which one to choose.
You have to choose the right one : )
 
artmedia70:
You have to choose the right one : )


Yeah. You can't really argue with that.) Not a shortcut, however, to check everything for correctness. But it is primarily dictated by your own extreme necessity.

I've been choosing for a year and still can't get into trading). I've been going through such a mountain that my head was spinning at first. The good thing is that it is absorbed over time and is much easier to grasp. Before studying mql4 I have tried different platforms, but I finally realized that I cannot go anywhere without mql4. I am very happy that there are so many competent people here. Almost in paradise)))

 

Good afternoon.

Can you tell me why I can't make changes to some libraries with the mqh extension ?

 
Stells:

Good afternoon.

Can you tell me why I can't make changes to some libraries with the mqh extension ?

You probably don't want to
 

I haven't started trading that long ago, and I'm just taking my very first steps in MKL. Please forgive me for the probably stupid question.
I came to the conclusion that I should use several indicators in my EA (at least 5, or better, more). And the values of these indicators are not necessarily related to each other by a simple dependence. Generally, there should be a black box with, say, five entries and two exits - Buy and Sell. Numerical value of each indicator may take several values (for example, also five, from 0 to 0.2, or from 0.2 to 0.4, or from 0.4 to 0.6, etc.). Alternatively, we can assume that this box has 25 inputs and two outputs. Suppose this matrix is known to me.
The question is, how would this be implemented? Apart from a very cumbersome system consisting of a lot of if statements, nothing else comes to mind. I don't want to be engaged in NS at the moment. Once again, please apologize if anything is wrong. Thank you!

 
vlozovsky:


The question is, how could this be implemented? Apart from an extremely cumbersome system consisting of many if statements, I can't think of anything yet.

Why is it cumbersome? Everything is columnar and smooth.
 
Stells:

Good afternoon.

Can you tell me why I can't make changes to some libraries with the mqh extension ?

If this is what I think it is, then you need to write *.mgh or *.mq4 in its place, close the terminal and the editor, open the file in a simple text editor (notepad), add a space in any place and write the changed file. Then open everything again, and re-call the file from the editor. The problem will disappear.
It looks silly, but it works. I haven't worked out the reasons.