[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 276
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
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. Would it make sense to just keep the computer running?
What you're doing is strange... When opening a position you assign the ticket number to one variable, but 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... :)
Ooh-ha-ha, yeah there's a lot of fun... Especially when you start checking))
Come on, one more time... It goes like this,
I open order:
Closing order:
Right, given a single order?)
Apparently the second option should be used. Thank you, BBSL.
You're welcome, I hope it really helps you))
What you're doing is strange... When opening a position you assign the ticket number to one variable, but 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... :)
I get it, the tikit number should be obtained like this:
What you're doing is strange... When opening a position you assign the ticket number to one variable, but 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... :)
Respect, thanks!))
I understand, you have to get the tickit number like this:
You know, with only one order, it might work, but if you still open it manually, it won't be the same. The ticket number should be saved in a variable, and after order selection we should compare its ticket with the stored one:
And in general, the order selection must be done using the OrderSelect() function in the loop:
This is just an example for understanding, not the finished working code, if anything... :)
You know, if you have only one order, it might work, but if you open more by hand, it won't be the same. The ticket number should be stored in a variable, and after selecting an order, we should compare its ticket with the stored one:
And, in general, the selection of orders should be done using the OrderSelect() function in the loop:
This is just an example for understanding, not the complete working code, if anything... :)
When closing orders, if there is more than one order, we should use this loop:
When closing orders, if there is more than one order, a cycle like this should be used:
Read the last line of my post. Who said I wrote an example to close?
The rest is the plain truth. Write your own textbook.
Can you tell me why OrderOpenPrice does not work? The task is to look for an order in the pool at a certain price, and if it's not there, put the order in and flag it as set.
Can you tell me why OrderOpenPrice does not work? The task is to search the pool for an order placed at a certain price, and if it's not there, put the order and set a flag that it's set.
We cannot compare real numbers.