My brain is boiling. Need a cheat sheet. - page 4

 
Vladimir M.:

After the right actions, the wrong actions? According to your phrase, I can assume that there is an error in the code - variables are not being reset. At the moment when the EA is triggered, i.e. bar opening or tick incoming, the variables and arrays in the EA must be reset or the values must be assigned to them. The quotes are updated, and the amounts and properties of orders and positions are retrieved and checked again. This is just an assumption - it can be eliminated by printing the values, before and after receiving the data. You can observe and compare in visual mode. Well, it's a tough job.

Or maybe there's something wrong with the logic...?

Let me explain the situation to you. Mamaev MAGOMED KHAN-MAGOMEDOVICH, aka zvezdochet, is far from programming. He ordered a robot and received a trial ex4 code. He detected runtime errors. The programmer made an excuse:

Here, x is a real number denoting Ask orBid, which are stored in computer memory with some limited precision in binary notation, while you and I use the decimal notation. It should be taken into account that all decimal numbers which do not represent a power of two can only be written in the form of an infinite fraction whose value is insignificantly, but greater or less than the represented decimal number. For instance, x=1.7750000...0001>1.77500 (the conditiontpis not fulfilled yet) and x=1.77499999...9999 <1.77500 (x is outside the Sell level 1.77500)

Now imagine that you are the programmer and the customer writes to you:

I can guess what kind of error is in the code - the variables are not being cleared. At the moment of the EA triggering - bar opening or tick incoming - the variables and arrays in the EA must be cleared or the necessary values must be assigned to them. The quotes are updated, and the amounts and properties of orders and positions are retrieved and checked again. This is just an assumption - it can be eliminated by printing the values, before and after receiving the data. You can observe and compare in visual mode. It's a tough job.

How would you feel about it?

 

The dubs are a stupid excuse. Firstly, they can and should be normalized, and secondly, even if they are not normalized, there will only be an occasional error and only by one pip. Except in cases where the position will not open at all due to incorrect lot or stop loss/teyprofit price.

 
JRandomTrader:

These nuances only concern the programmer, and how to get around them, too. The customer does not need to know about them. And my explanation was intended for a novice programmer.

Wise words!!! The programmer said that we should have introduced an additional parameter "Take Profit Zone". That is, if Sell 1.20000 tp 1.19500, with the parameter = 50 pips the five-digit order may close near 1.195000 - 1.94500 ...........That's why I asked HOW do we close on Take Profit without any additional parameters?That's why I said that the brains are bubbling over with seemingly obvious truths....

 
Konstantin Erin:

Let me explain the situation to you. MAMAEV MAGOMED KHAN-MAGOMEDOVICH, aka zvezdochet, is far from programming. He ordered a robot and received a trial ex4 code. He detected runtime errors. The programmer made an excuse:

Here, x is a real number denoting Ask orBid, which are stored in computer memory with some limited precision in binary notation, whereas you and I use the decimal notation. It should be taken into account that all decimal numbers which do not represent a power of two can only be written in the form of an infinite fraction whose value is insignificantly, but greater or less than the represented decimal number. For instance, x=1.7750000...0001>1.77500 (the conditiontpis not fulfilled yet) and x=1.77499999...9999 <1.77500 (x is outside the 1.77500 level)

Now imagine that you are the programmer and the customer writes to you:

I can guess what kind of error is in the code - the variables are not being cleared. At the moment of the EA triggering - bar opening or tick incoming - the variables and arrays in the EA must be cleared or the necessary values must be assigned to them. The quotes are updated, and the amounts and properties of orders and positions are retrieved and checked again. This is just an assumption - it can be eliminated by printing the values, before and after receiving the data. You can observe and compare in visual mode. It's a tough job.

How would you feel about it?

Kostya!!! We treat everything that is foreign relatively, because we trust Anstein !
 
Алексей Тарабанов:

And show me the code of the program for opening a position. The module that places the order.

More precisely, the module that calls it.

In other words, I'd like to see what condition you use to place the order.

I may press Buy or Sell manually or set pending orders. To have a code you have to write it first, but here, the binary system is out of the way ...

 
Zvezdochet:

I can manually press Buy or Sell or set pending orders. In order to have a code, you have to write it first, but here, the binary system is out of the way...

Maga! Calm down... You're getting banned again!!!
 
Zvezdochet:

Wise words! The programmer said we should have introduced an additional parameter "Take Profit zone". That is, if Sell 1.20000 tp 1.19500, with the parameter = 50 pips a five-digit order may close near 1.195000 - 1.94500 ...........That's why I asked HOW do we close on Take Profit without any additional parameters?That's why I said that the brains are boggling from seemingly obvious truths....

But the customer should understand that a take or stop is not when the price "came to this point", but when "the price crossed this line". For the point, the price can skip it. But if you want a "point", then you have to specify the width of this "point" zone.

 
Zvezdochet:


About the exact opening. There was a programmer who coined the term "Absolute match with the mark". In 90% of the orders opened! I do not want an absolute match . But when my EA is acting on the next grid step (instead of the current one), I cannot understand it:At the current level the EA has done one correct action . At the same level EA has to perform other correct actions . So these actions are performed at the next level and the values relate to the previous level !Example Buy 1.20000 sl 1.19500 tp 1.20500 Sell 1.20000 sl 1.20500 tp 1.19500 , one of the orders is opened at the next step of the grid, at " another" level, where the records remain ! level , entries remain unchanged at "their" level 1.20000

That is why I asked for the code of the module that defines order placement.

What is the condition of level breakdown check? If it is not Open and not a tick, everything is normal. A bar must finish its formation and give a signal to open a position on the next bar, otherwise it cannot do so.

 
JRandomTrader:

But the customer must understand that a take or stop is not when price "came to this point", but when "price crossed this line". Because the price can pass through that point. But if we want to reach a "point", we should specify the area width of this "point".

If the level is crossed in order to close the order at Take Profit, we can mathematically consider it equal or infinity to the higher side of Take Profit. I am happy with that . But the trouble is the levels in the terminal using the decimal notation The problem is that the EA does not see levels in decimal notation because it uses binary notation. What do I do now? I have to sit down with a pen and paper and copy price values that my Expert Advisor sees?And then I have to solve the puzzle: "How to use this framework for the whole algorithm"? And if instead of 100 pips an order is closed with 50 TP, is it also the fault of binary system?

 
Алексей Тарабанов:

That's why I asked for the code of the module that defines order placement.

What is the condition for checking for a level breakdown? If it is not Open and not a tick, then everything is natural. The bar should finish forming and give a signal to open a position on the next bar, otherwise it is not possible.

The code...module.... bar formation .... I can hardly read such words, let alone memorize them or give an intelligible answer...I will try to copy your words and send them to the programmer, but I think (it's already happened more than once) he'll say, "We've got a mustache ourselves".

Reason: