[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 37
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
Question, how can I programmatically close all orders, e.g. every 30 minutes?
If I understand correctly, with a check on the condition of orders in the market? -
Interesting stuff! Can you post the full code? It's not quite clear how the orders are tied in to the funds being deposited/withdrawn. Can we determine how much money was deposited to the account at the beginning, the initial balance so to speak, without recalculating the history of closed positions? Not all brokers provide the whole trading history, some not older than 1 month, so the recalculation of the profitability of the Expert Advisor is wrong: The start date is correct, but the balance is the one that was one month ago. As a result, the monthly profit is stretched over the entire trading period.
Question, how can I programmatically close all orders, e.g. every 30 minutes?
If I understand correctly, with a check on the condition of orders in the market? -
Interesting stuff! Can you post the full code? It's not quite clear how the orders are tied in to the funds being deposited/withdrawn. Can we determine how much money was deposited to the account at the beginning, the initial balance so to speak, without recalculating the history of closed positions? Not all brokers provide the whole trading history, some not older than 1 month, so the recalculation of the profitability of the Expert Advisor is wrong: The start date is correct, but the balance is the one that was one month ago. As a result, the monthly profit is stretched over the entire trading period.
This is probably not the case after all.
In the terminal, open the "Account history" tab, right click, select "All history".
The history will be downloaded all the way back to when the account was opened.
If I understand correctly, with a check on the condition of orders in the market? -
Interesting stuff! Can you post the full code? It's not quite clear how the orders are tied in to the funds being deposited/withdrawn. Can we determine how much money was deposited to the account at the beginning, the initial balance so to speak, without recalculating the history of closed positions? Not all brokers provide the whole trading history, some not older than 1 month, so the recalculation of the profitability of the Expert Advisor is wrong: The start date is correct, but the balance is the one that was one month ago. As a result, the monthly profit is stretched over the entire trading period.
What do you mean "closes in a second"?
A long time? Or what?
The charter means that it closes the order in the same second, not in 30 minutes.
I have set it as in your example
The robot does not close for other reasons, i.e. it does not close on stop or on profit.1 2011.07.29 00:00 buy 1 0.01 1.4328 1.3328 1.5328 0.00 1000.00
2 2011.07.29 00:01 close 1 0.01 1.4327 1.3328 1.5328 -0.10 999.90
3 2011.07.29 00:01 buy 2 0.01 1.4329 1.3329 1.5329 0.00 999.90
4 2011.07.29 00:01 close 2 0.01 1.4326 1.3329 1.5329 -0.30 999.60
5 2011.07.29 00:01 buy 3 0.01 1.4328 1.3328 1.5328 0.00 999.60
6 2011.07.29 00:03 close 3 0.01 1.4327 1.3328 1.5328 -0.10 999.50
7 2011.07.29 00:03 buy 4 0.01 1.4329 1.3329 1.5329 0.00 999.50
8 2011.07.29 00:03 close 4 0.01 1.4329 1.3329 1.5329 0.00 999.50
This is not the issue here, but whether there have been deposits/withdrawals to/from the account by a certain time. There is no code yet, there is a basic formula for calculating the position volume adjustment here. (The number (in terms of total funds) of the deposits/withdrawals is tied into it)
I get it.
And if you consider opening an account with $0 as a start, and the 1st deposit as a topping up. Is it possible to determine programmatically all toppings (including the first one) that have been made to the account?