Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 875

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, I want to place limit orders, I don't understand the difference between OrderOpen() and PositionOpen() methods. I've read the help, the enumerationENUM_ORDER_TYPE in both of them.
The notes they have are like this:
Successful operation of OrderOpen(...) method does not always mean successful execution of a trade operation. You should check the result of trade request execution (return code of trade server) by calling ResultRetcode() method as well as value returned by ResultOrder() method.
Successful completion of the PositionOpen(...) method does not always mean successful execution of a trade operation. It is necessary to check the result of trade request execution (return code of trade server) by calling ResultRetcode() method, as well as value returned by ResultDeal() method.
Why do we need additional methods SellLimit, BuyLimit, etc.? You can also set a limit by using a special predefinedstructure MqlTradeRequest.
Why is it necessary to place an order in different ways?
Please advise, I want to place limit orders, I don't understand the difference between OrderOpen() and PositionOpen() methods. I've read the help, the enumerationENUM_ORDER_TYPE in both of them.
The notes they have are like this:
Successful operation of OrderOpen(...) method does not always mean successful execution of a trade operation. You should check the result of trade request execution (return code of trade server) by calling ResultRetcode() method as well as value returned by ResultOrder() method.
Successful completion of the PositionOpen(...) method does not always mean successful execution of a trade operation. It is necessary to check the result of trade request execution (return code of trade server) by calling ResultRetcode() method, as well as value returned by ResultDeal() method.
Why do we need additional methods SellLimit, BuyLimit etc.? Besides, the limit can be set using a special predefinedstructure MqlTradeRequest.
What is it for and why?
That is, we should not confuse a Pending Order with a Position - that's one. In general, several solutions are implemented for different purposes, that's two.
Most likely it was crossed, but it was redrawn.
You should check the signal after the candle closes.
The crossover is unlikely. The tails of the candlesticks do not tell you anything about the crossovers.
What do you mean, "You should check the signal after the candle closes"?
Am I a mql "novice"? a month into the subject. I have everything on open candles. VRI doesn't have this parameter at all though.
That is, we should not confuse a Pending Order with a Position - that's one. And in general several solutions are created for variety and for different tasks - that's two.
I can place a Limit order with any of these methods, my question is, what are these different tasks?
I don't think there was a crossover. The tails of the candles are nothing to be crossed at.
What do you mean, "You have to check the signal after the candle closes"?
There was. Don't even doubt it. It happens with almost every indicator on the zero bar. The point is that the value of the indicator remains at the candle's close. And while the candle is not closed, the indicator's values change together with the current price changes.
I can set the limit using any of these methods, my question is, what are these different tasks?
Then please try usingPositionOpen to set Buy limit. I've never been into such machinations: I usePositionOpen ONLY for opening POSITION. In general, I'm sorry I got into the section for an old terminal I did not consider.
Leaving.
There was. Don't even doubt it. It happens with almost every indicator on the zero bar. The point is that the value of the indicator stays at the state when the candle closes. And while the candle is not closed, the indicator changes its value along with the current price change.
Yes? M.B.
OK, not fatal, but unfortunate. There's nothing to be done, is there? There's no parameter in VRI to build the signal by candlestick closing.
Thanks for the clarification.
Then please try usingPositionOpen to set a Buy limit. I've never been into this kind of machismo: I usePositionOpen ONLY to open a POS. In general, I'm sorry I got into the section for an old terminal, I did not consider it.
Leaving.