Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 294

 
borilunad:
The spread changes all the time! You already pay it by opening at Ask in Bai and closing at Bid, and Sell, of course the opposite!

Yeah, who has it floating, I agree.

but where it is fixed?

If there is no such function in mql, can we add a variable that needs to be entered when calling the script, which will be added to the stoploss?

Thanks for the reply.

 
It's just not convenient because it always closes SL first, sometimes before reaching TP.
 
MaximuS60:
It's just not convenient because it always closes SL first, sometimes before reaching TP.
Just add the spread to the b/w and that's it!
 
borilunad:
Just add the spread to b/w and that's it!

If you could help, I would be grateful.

this is how i see the situation: create an extern int variable to be added to zeroprice

I only do not know in what place it should be done.(

 
MaximuS60:

If you could help, I would be grateful.

This is how I see the situation: create an extern int variable to be added to zeroprice

I just don't know where to do it.


With your approach, you could, for example, do it here
 
VladislavVG:

With this approach of yours, you could, for example, here

bad example)
 
MaximuS60:

bad example)

Then show me what you have written and explain what is not working. If you want it done for you, the example above is a good one.
 
VladislavVG:

Then show me what you have written and explain what is not working. And if you want someone to do it for you, the example above is the right one for you.

So as not to start pointing fingers in the sky, I will wait for an answer, or a hint.
 
MaximuS60:

so as not to start with a thumb in the sky, I will wait for an answer, or a hint.

It's up to you, but water won't flow under a rock ;)..... Wait for it.
 
MaximuS60:

Not to start with a finger in the sky, I'll wait for an answer, or a hint.
Why the finger? Why in the sky? Over here. They're sure to give you a hint.
Reason: