Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 967
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
Hi. I want to close differently directed positions when profit =0 Different number of buy and sell positions, different lot sizes.
What is wrong with the average price search function, i.e. the zero profit point?
I believe this code only works for differently directed 2 orders
If there will be multiple Buy and Sell orders and all with different open prices, it seems this does not work - you need to take into account the profit of the order and the point value in the currency
i have looked at what i have at hand, i did not find anything, but i do know that i have tested this code
it seems there is an indicator in QB that correctly calculates levels for differently directed orders - I looked for and found it last year
Hello, I want to close differently directed positions when profit =0 Different number of buy and sell positions, different lot sizes.
What is wrong with the average price search function, i.e. the zero profit point?
I believe this code only works for differently directed 2 orders
If there will be multiple Buy and Sell orders and all with different open prices, it seems this does not work - you need to take into account the profit of the order and the point value in the currency
i have looked at what i have at hand, i did not find anything, but i do know that i have tested this code
it seems there is an indicator in QB that calculates correct levels for opposite orders - i searched last year and found it
Then you didn't check it properly... This is a classic 100% calculation 0
Then you haven't checked it properly... This is a classic 100% calculation 0
Well, I'm not even going to argue, come back to earth, try to check where you will have a breakeven level if you put it from top to bottom on the chart
1. Buy - Buy - Buy - Sell - Sell - Sell
2. buy - sell - sell - sell - buy - buy
this is the correct calculationhttps://www.mql5.com/ru/code/10007 version 2 , this is the calculation to use
better check your classic calculation
Hi, help a beginner with a simple task. The indicator in a separate window shows fractional numbers 0.123456 1.123456 and I need integers like 123 1123
Anybody care to give me a hint on how to fix this?
Hi, help a beginner with a simple task. The indicator in a separate window shows fractional numbers 0.123456 1.123456 and I need integers like 123 1123
Anybody care to give me a hint on how to fix this?
The easiest thing I could think of)
If you want to put stops, it's better not to do it on multidirectional positions. This is a very good idea to place stops on these positions. But even these brokerage companies have moments when the spread jumps. That is why the best variant is to calculate profit and close positions when it is a bit more than 0 (slippage is still considered). That is, work with the current market moment.
Trying pyramiding, building up with a smaller lot on the trend but with opposing open.
Thanks to everyone who helped.