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

 
Aleksei Stepanenko:

The indicator draws the middle for any number of trend lines:

Thank you!
 
MakarFX:

I have it like this

This might help.

расчет уровня безубытка группы ордеров

This is not a lossless level calculation as you are counting at opening prices.

 
Andrey Sokolov:

this is not a lossless level calculation as you are counting at opening prices.

I don't understand... What prices should you use to calculate the no-loss level?
 
MakarFX:
I do not understand... What price should I use to calculate the level without loss?

for buy, the opening ask price. If you calculate by it, then at least you will make a mistake on the opening spread.

As I understand it, we need to calculate from the current bid price to the level where there will be 0 for money. I understand how to calculate it for any pairs, if the client considers it necessary, I will do it.

 
Andrey Sokolov:

for buy, the opening ask price. If you calculate by it, then at least you will make a mistake on the opening spread.

As I understand it, we need to calculate from the current bid price to the level where there will be 0 for money. I understand how to calculate this for all pairs, if the customer decides I will do it.

I.e. you need a no-loss calculation for pending orders?

 
MakarFX:

So you want a no-loss calculation for pending orders?

Makar, what is the loss for pending orders?

 
Andrey Sokolov:

Makar, what is the loss on pending orders?

And what is the Ask for open orders?

 

If an order is open, the opening price does not change, only the pip value can change.

Hence: Profit, swap and commission divided by the point value

 
MakarFX:

And what is the Ask for open orders?

Let's stop here so as not to litter the forum.

 
MakarFX:

If an order is open, the opening price does not change, only the pip value can change.

Hence: you divide the sum of profit, swap and commission by the pip value.

Once again - for buy,the openingprice is ask. If you use it, you will at least miss the opening spread.


Hence: take the sum of profit, swap and commission and divide by the pip value - and you may do it only for those pairs, where pip value doesn't change.