Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1343
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
The middle one is for me as an example. There will be a different, calculated level.
any level can be set there, and in any quantity
Hello. Could you please tell me how to calculate the Bid price.
How do I calculate a Bid price which several BUY positions will have a total zero profit for currency pairs, where the base (first) currency is the dollar, and the pip value is not constant and depends on prices?
For pairs where the dollar is the quoted (second) currency and the pip value is constant I have derived this function,
Thank you very much for noticing and telling me, I fixed it and in 2 years of testing there were 26 errors 130. At the same time 115 trades opened normally
if the pending orders are placed at a distance from the current price less than the STOPLEVEL, there will be an error 130
that's why you were given this code
or if you have to take it into account in some other way
MarketInfo(_Symbol, MODE_STOPLEVEL);
Hello, I need code to close market orders a certain time after they open (24 hours, 48 hours). The time should be adjustable.
like this
This will help you)
Unfortunately it didn't help. This one is generally guided by opening prices
Unfortunately it didn't help. This one is generally oriented towards opening prices.
Then I do not understand what you need.
Andrey Sokolov:
How to calculate the Bid price at which several BUY positions have a total zero profit
i.e. Breakeven?
Then I don't understand what you want.
I.e. break-even?
To calculate a closing price for one or more unidirectional orders (bid for buy) at which their total profit+savings+commissions == 0.
This problem occurs in pairs where the base currency is dollar and the point value changes.
The middle is for me as an example. There will be another, calculated level.
The indicator draws the middle for any number of trend lines: