[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 275
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
Good night all!
Could you please tell me if I open a position like this?
What is the best way to close it, if my Expert Advisor can open only one position?
How about this:
It is not clear how to get a unique order number. And how to know that this order is the right one. Please share your experience!
It is not clear how to get a unique order number. And how to know that this order is the right one. Please share your experiences!
See here https://docs.mql4.com/ru/trading/OrderSelect
When you have chosen the order, you only need to check whether it is the right one or not. If it is not needed, we move on to the next order and check it again. Until the right one is found
I am trying to master MT5.
When installing one Expert Advisor I faced a small problem - the work of this Expert Advisor is possible only after loading a certain history, i.e., install it and wait until the loading is completed. The worst thing is that it seems that this history is not saved, because on another day everything repeats.
Can you please explain if there is any way to save the downloaded history? Thank you.
Look here https://docs.mql4.com/ru/trading/OrderSelect
Once you have selected an order, all you have to do is check whether it is the right one or not. If it is not, move on to the next one and check again. Until the right one is found.
I have looked through a textbook up and down...
Does it mean that we know the number of order?
I think we need to use OrderTicket();, to get the number, right?
I've been through the textbook up and down...
Does this mean that the order number is known?
You should use OrderTicket();, to get the number, right?
OrderTicket() can be used by pre-selecting it with OrderSelect(). And any operation on an order requires it to be pre-selected using OrderSelect()
I am trying to master MT5.
When installing one Expert Advisor I faced a small problem - the work of this Expert Advisor is possible only after loading a certain history, i.e., install it and wait until the loading is completed. The worst thing is that it seems that this history is not saved, because on another day everything repeats.
Can you please explain if there is any way to save the downloaded history? Thank you.
If we're talking about ticks, you could write code that saves the data file, but you'd have to load it from a file in ekspert. Would it make sense to just keep the computer running?
OrderTicket() can be used by pre-selecting it with OrderSelect(). And any operation with an order requires its pre-selection using OrderSelect()
In other words:
If we are talking about ticks, you can write code that saves the data file, but you will need to load from a file in ekspert. Maybe it makes sense just to keep the computer on?
If Expert Advisor is pips, then data should be "fresh", for old ones there will be only noise...
Good night all!
Could you please tell me if I open a position like this?
What is the best way to close it, if my Expert Advisor can open only one position?
Maybe it goes like this:
This is a strange way to do it... When opening a position, you assign the ticket number to one variable, and you check another one...
And OrderSend() returns -1 (minus one) in case of failure, and you check for less than one, when you need less than zero
This is the first thing that catches your eye. But I think you have a lot of interesting things there... :)