Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 704
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Please advise what the nuances are with inserting an OBJ Bitmap label object.
1. Only BMP files are supported?
2. What should this bmp be?
For example, if I save it to JPG, then convert it to bmp using Auotator (from MAC os), then this file won't open in MT4.
Who knows or has a script or function "close with overlapped orders", which is executed manually in MT4, when you need to close more than 2-3 positions, so as in CloseBy, spread would be saved? I would be happy for any leading answer!
Here.
Thanks!!! I'll try to figure it out so I can put a function in the owls!
Sorry, too much stuff and complicated! For now we'll have to close in stages with a double-check of what hasn't closed!
Thanks! I'll try to figure it out so I can put a function in the owls!
Sorry, too much stuff and complicated! For now we'll have to close in stages with a double-check of what hasn't closed!
Such a function:
here.
Such a function:
Here.
Thank you very much, and no offence, please! I have found it, the function is more than 100 lines, and as I understood it, I also need to attach a library, so it's not for me, I can't afford it! There is no sense in making mess for 4 or, in a pinch, 6 orders! I will not do it, it is too unusual for me! I still have to deal with mine, but it is getting better and better! And with mine it's easier, like a fish in water, easier, but also with my findings! Maybe "bicycles" have already been invented, but getting there and doing it yourself, then it's easier to work with your own! Once again, please excuse me! All the best and success!
Hello comrades! I apologise at once for the nouveau riche question. The opening price of the order is 1.61029. I used "OrderOpenPrice" to use this value in the script. Checked the result via "Alert" and got - 1.6103. Here is the code:
int start()
{
OrderSelect(1,SELECT_BY_POS);
double OP=OrderOpenPrice();
double OPP=NormalizeDouble(OP,16);
Alert("Opening Price ",OPP);
return(0);
}
What should I do to get the exact price value as an output? Thanks in advance.
Hello comrades! I apologise at once for the nouveau riche question. The opening price of the order is 1.61029. I used "OrderOpenPrice" to use this value in the script. Checked the result via "Alert" and got - 1.6103. Here is the code:
int start()
{
OrderSelect(1,SELECT_BY_POS);
double OP=OrderOpenPrice();
double OPP=NormalizeDouble(OP,16);
Alert("Open Price ",OPP);
return(0);
}
What do I need to do to get the exact price value in the output? Thank you in advance.
If you opened Buy, on Asc, then this is the price on Bid! That's right, the difference is spread + slippage, which needs to be taken into account! And you can't open exactly, everything is on the move! ;)
If you opened a Buy, on Asc, it's the price on the Bid! That's right, the difference is spread + slippage, which needs to be taken into account! And you can't open exactly, everything is in motion! ;)
Apparently I didn't explain the problem accurately. I have an open order GBPUSD (not a pending one) and the open price is 1.61029. The function OrderOpenPrice, as I see it, should return the actual open price of the order (1.61029) but it returns a value rounded off to 4 decimal places, 1.6103. Tested on different orders with different open prices - the result is the same: the last digit is missing.
Apparently I didn't explain the problem accurately. The thing is, there is an open GBPUSD order (not pending), the open price is 1.61029. The function OrderOpenPrice, as I understand it, is supposed to return the real open price of the order (1.61029). However, it returns a value rounded off to 4 decimal places, 1.6103. Tested on different orders with different open prices - the result is the same: the last digit is missing.
For that, there's DoubleToStr(), which will write with real Digits, but will write with 4! See the Documentation at the top left, you'll find everything there and learn a lot + tutorial!
There you go: