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
When implementing different "grids" I came up with the following structure:
The structure is filled in on every new tick, based on the Magic Number value (it stores all the information needed to identify the order: order number, which grid it belongs to, etc.).
This is the code I came up with
...
"By the way - if the Windows is down, the EA cannot delete orders either - only manual here, so this example cannot fully apply to auto-trading."
POSSIBLE, you probably don't know how. If interested I can post the code.
No, you don't need a code. Algorithm in a nutshell, if you can... I really don't know how to run an EA in a terminal running in a crashed OS
It's easier for me to lay out the code than to explain it:
This is the code I came up with
Shit, man, *** don't bullshit. You yourself have defined the right direction: state should be recovered from the current environment, what MT gives you is the most reliable option. Instead of it, you write a long and useless class Info, into which you have to somehow cram the values found by external functions. Yes, eventually it will contain the variables you need: maximum and minimum ticket in terms of price for the order, as well as other important for you stuff. But in reality the problem is solved by a specialized container of orders: Imagine you have a list of orders, where each order represents a table row with many columns (order id, open time, open price, profit, etc., etc.). You do sorting by one of the columns, and get exactly the sequence you need. So, all this can be done with help of classes, which you like to use (though clueless, sorry). How to do it - I'll write tomorrow, if you're interested.
Very eager to see....
I need information not for the sake of information, but for further processing and calculation ...
It's easier for me to post the code than to explain it:
How will it work on a broken computer? (no surprise at all with the functions).
That's why I said - I don't need code. I need an algorithm that works on a computer that doesn't work (the axis is broken, if you remember a quote: "I really don't know how to run the Expert Advisor in the terminal, which is running on the crashed OS", and I don't need VPS and other stuff - think, that the OS on the computer, server, etc., where the terminal with the Expert Advisor is running, is crashed - your code is a poultice for it there and ... ).
How will it work on a broken computer??? (no surprise at all with the functions).
That's why I said - I don't need code. I need an algorithm that works on a computer that's not working (because the OS is down, if you remember - and I quote: "I really don't know how to run the Expert Advisor in the terminal, which is running on the crashed OS", and I don't need VPS and other stuff - think, that the OS on the computer, server, etc., where the terminal with the Expert Advisor is running, is crashed - your code is a poultice for it there and ... With your code and ... ).
Here we go, forger in the forest...
Let's finish our discussion here!
Here we go, for better or for worse...
Let's end our discussion here!
No problem. I'm sick of trying to get my point across...
The bottom line is that even if the operating system on the server is down, you can run a home PC that will restore control of the account at the time that is required to restart the servo.
In my practice of working with the VDS / VPS servers OS has never flipped, but restarts are unforeseen and scheduled happens.
The essence of my question is to competently write code which collects information about current situation...
...
The point of my question is to correctly write code that collects information about the current situation...
You wrote here that you have already written in procedural style. So, all you have to do is to collect it all into a class. You can also remove some parameters from function call, make methods for presetting parameters (magik, symbol), but it's better not to do.
Of course if there is nothing to do, you can go another way. Class. It has method Refresh() to get list of orders (the only one that can return false). The other methods use this list.