[ARCHIVE]Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Can't go anywhere without you - 5. - page 314
![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
I got the fucking error myself. In fact, there is no logic at all. To open a pending order according tohttps://book.mql4.com/ru/appendix/limits, the opening price should be either below Bid (for selling) or above Ask (for buying). I am doing as required.
From time to time I get 0 and 130 errors. Although 130 is an error of wrong stop, which can happen during modification, but not during order opening.
On the screenshot the situation and the print displayed by the pr function.
Please advise how to get rid of this bug. I am really sick and tired of this error. Logically, it is not on the subject at all.
Victor, apart from above-below, you need to use a preventive gap, because while the order is being sent, the price is not standing still, so you get a step or a step into the forbidden zone! Insert as in modification and a bigger slippage, and you'll be fine! Working on Real with no mistakes! Good luck!
Boris, so the slippage is already worth 3, this, as I understand 3 points. How much more do you need?
You mean like this:
I'm wondering how to implement it in a better way, so as not to put extra functions in here.
hoz, at I was wondering how to shorten the if even further.See: if we put a variable
we have cnt=cnt+step, where
But 1=cnt/cnt, a -cnt=cnt/(-1), the only difference is the denominator. Now recall that x^0=1, x^1=x, i.e. we can put our Boolean variable _if in the exponent, i.e.step=cnt/a*(cnt^_if); where
But ±a is supposedly 2*_if-1, i.e.
Or we simplify
Boris, so slippage is already 3, that's what I understand by 3 points. How much more do you need?
You mean like this:
I'm wondering how to implement this more intelligently so as not to put extra functions in here.
Guys, please advise a script that gives a message that the market is open and that the market is closed.
I.e. when monday comes 0.00.01 it gives a message that the market opens, then the message that "the market is open," similarly, that the market has closed.
I've written a script but it doesn't work (( Help me figure it out.
Is there any robot capable of placing pending orders BAY STOP and SELL STOP At a certain point in time , with a minimum step of triggering from the price at that time. In short, under the news. I do not have time with my hands.
I got the fucking error myself. In fact, there is no logic at all. To open a pending order according tohttps://book.mql4.com/ru/appendix/limits, the opening price should be either below Bid (for selling) or above Ask (for buying). I am doing as required.
From time to time I get 0 and 130 errors. Although 130 is an error of wrong stop, which can happen during modification, but not during order opening.
On the screenshot the situation and the print displayed by the pr function.
Please advise how to get rid of this bug. I am really sick and tired of this error. Logically, it is not on the subject at all.
I hope slippage 3 for 4 digits, if you need 30 for 5!
So there's no slippage at all in the tester, for that matter... Corrected to 30.
130th error is not necessarily stop orders. It is also a distance of pending orders at least equal to int MarketInfo(Symbol(), MODE_STOPLEVEL)
Here it is:
Where:
g_stopLevel = MarketInfo(Symbol(),MODE_STOPLEVEL) * pt;
It's written in the same way as yours Artem. It was the same yesterday by logic. But the errors are piling up. There is no sense in adding extra points to make it work in the tester, where there are no requotes or slippages at all.
What should I do in a more universal way to avoid getting into the same mistakes? I've seen so many Expert Advisors that have never added 2-3 extra points except for slippage. After all, in this case there will be a 6-pp deviation from the required price. And this is not right. The Expert Advisors are written for both ticks and minutes. And it seems that there may be accuracy in trading. So, I want it to be accurate, not to have huge indents...
Friends!
A global question has arisen
Is it possible to get the tick stream in the terminal on weekends, so that I could write and debug EAs quietly?
I've already got a few tips on how to use it in my trading robot.
i can't use one tick triggering the EA, i need a flow of ticks in a certain range
is there such a thing in nature?
mt4 servers that emulate streaming quotes on weekends ?
Guys, please advise a script that gives a message that the market is open and that the market is closed.
i.e., when Monday 0.00.01 gives the message that the market opens, then the message that "the market is open", similarly, that the market has closed.
wrote a script but for some reason it does not work (( help me figure it out.
If it is a script and it is located in the scpirts folder, then it has worked once and has been removed from the chart. In order to keep it permanently, write your code inside this