![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
This and that, lots of unnecessary calls to other functions with resulting errors!
Well, you've already made mistakes...
It's simple and straightforward: you can edit it to suit your needs.
Can you draw something similar to this one...
update...
Attached is a script to test the ExistOPNearPrice() function
Made it, don't know if it's correct.
Well, you've already made mistakes...
It's simple and straightforward: adjust as you like.
Did it, I don't know if it's right.
CorrectingPrice().
CorrectingPrice().
Igor, some brokerage companies use Spread*2 instead of StopLevel that has zero value. After a cursory glance at the code, I did not see any check for this situation. It would be nice to tweak the code to check this situation, otherwise it will be the same 130 errors
Artem, I didn't meet such DC... Can you send me a couple of them in your personal message? I'll read the trade regulations...
Or is there a simpler way to go about it? Can you tell me, is it correct enough to use such correction?
UPDATE: I have corrected theCorrectingPrice() function.
A new version of the CorrectTF() function.
Some time ago I was criticized for theCorrectTF() function claiming that its functionality does not correspond to its name. In fact, it adjusts the timeframe to the nearest minimum and not just to the nearest one. I have calculated the arithmetic mean values between the standard timeframes and rewritten the function according to its description.
Artem, I did not meet such DC... Can you send me a couple of them in your personal message? I'll read the trading regulations...
Dropped
Or you could do something simpler. Can you tell me, is it correct enough to use such correction?
Of course, everything is correct.
UPDATE: I correctedCorrectingPrice() function.
Artyom, I haven't come across any DCs like that... Can you send me a couple of them in your personal message? I'll read the trading regulations...
Or you can do it in a simpler way. Tell me yourself, is it correct enough to use such an amendment?
UPDATE: I have made an amendment toCorrectingPrice() function.
Hello, colleagues, I'm still studying the code, I can't understand the subtleties well and am in a bit of a quandary.
As I understand it, we have to call this function to correct the parameters before placing an order.
There is such a line to open an order:
if(buy == true && Open[0]>UpTr && Trade) {
buy=OrderSend(Symbol(),OP_BUYSTOP,LOT(),NormalizeDouble(op,Digits),slippage,NormalizeDouble(sl,Digits),NormalizeDouble(tp,Digits), "T",Magic,0,MediumBlue);
is this where it should be addressed? And how to do it correctly. Or this command doesn't needCorrectingPrice()?
Thank you in advance.