![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
error 130 all the time.
StopLevel should be checked, for StopLoss and Enter.
and icho
should the highest one be chosen?
-130 probably because of an attempt to set a pending order, and the price went above or below) in the code, there are lines uncommented with Marketlevel... this is the future price tracking, so there is no this error)
-Lowest low or high of OrderOpenPrice for stop) If buy, lowest H4 low of 0 candle and 1 candle... and the highest high for a sell... Generally lowest low/high for stop
-130 probably because of an attempt to set a pending order, and the price went higher or lower) in the code there are lines uncommented with Marketlevel... this is the future price tracking, so that there is no this error).
-Lowest low or high of OrderOpenPrice for stop) If buy, choose the lowest H4 low of 0 candle and 1 candle... and the highest high for a sell... In general the lowest low/high for stop
To fix it, now go to the highest low for buy and the lowest high for sell.
or as follows
Nada to correct, now for buy the biggest low is chosen, and the smallest high for sell.
Logically it is, all right!) This is the choice for the stop (it is chosen the smallest in ppt. of the two options)
Example:
![](https://c.mql5.com/mql4/forum/2009/07/hmsfhc.gif)
But your version is better and simpler... I'll correct it, but in reverse) Thanks.Corrected the code on page 5.
Logically it is, all right!) This is the choice for stop (it is chosen the smallest in ppt. of the two options)
Taki for buy the smallest)
imho better the biggest one and trawl on the first bar, different logic :)
StopLevel.
you can change Enter
or open an order
or think of something else)
taki for buy the smallest)
imho better to buy with the highest one and trawl on the first bar, different logic :)
With StopLevel.
you can change Enter
or open an order
or you may come up with something else.)
The open price should be further by StopLevel from Bid or Ask. From the open price take the Take and Stop positions which should also be no closer than the StopLevel. But for them we may use the close block by profit or drawdown.
...imho better the biggest and trawl the first bar, different logic :)
Did it this way too... but the test result is better at the current stop)
Corrected the stopplay...
...or open an order straight away.
(It's much safer to enter with pending orders) Otherwise, your brokerage company or nofarms will open you very far...))
>> tweaked the code.
Corrected the stopgap...
(It's better to use pending orders) Otherwise, the DC will show something or nofarms will open you very far...))
>> fixed the code.
Fix old bugs, add new ones :D
Fixed it too)
Fix old bugs, add new ones :D
what for?
And MarketInfo() returns type double, why convert it to Point...?
That too... two conditions.
I think that's all I noticed. It's better to explain what was changed for) So I can keep it in mind for the future.)
I don't understand...)
And MarketInfo() returns type double, why convert it to Point...?
This one too...
0.5*Point is a delta, you can also convert it to 0.7 :)
See comparison of real numbers.
will probably work properly without it. in most cases)
the error was
it returns a value in pips. multiplied by Point.
It was
if true StopLoss is assigned a new value,
Otherwise the order is modified.
no error, but I have to take off either a cross or put on trousers)