Recording sequentially after closing each order the amount they were closed.
-
I would like to just record the values of each order as each of them individually closes.
A reset must always be done when a new day starts, changing all the values to 0 and filling in the values of the 10 new orders again.
Can you help me finish this project?
I noticed that I am recording from the first day, but as soon as the next day starts new orders are opened and the data is not being updated. -
Not sure I fully get it. Do you need to see all closed trades today and then reset them all at the beginning of the new day? What is the point of that? Just take a look at the Account history tab.
-
@l-andorrà
exactly that. imagine i'm on day 1 and my EA starts trading. after finishing this trade 1, the result value of it must be recorded in variable 1. Then another trade opens, so this one to be closed must record its value in variable 2. It is And so on. Then day 2 started, my EA resets these variables to the value 0, and then the EA performs trade 1, when this trade 1 is closed, its value must be recorded in variable 1 and trade 2 happens and writes a new value, and so on for 10 trades. -
Ever time you save into 1, save existing 4 into 5, 3 to 4, 2 into 3, 1 into 2 etc
-
I don't understand, can you give me an example?
I already tried to manipulate in all ways, maybe my logic is not correct. -
I don't understand, can you give me an example?
I already tried to manipulate in all ways, maybe my logic is not correct. -
Set up a test project, when something happens save V1 into V2 and then new into V1, put these results into a comment and watch on back test what happens.
-
@jstap
I still don't understand what you're saying, without showing it with images it's hard for me to understand, I'll try to show what I'm doing:- Here below I am performing a Looping on all orders (already closed) in the pink block.
- I created a condition to (filter) only the orders that were (closed) on the day, month and year (current) so I defined 0, that is, I understand that every (new day) new values should be saved.

Then I call check each closed position in the sequence I want and save it in the variable.
In the first rule I meant:- Loop only the (1) oldest order and write to the variable (ORDERCLOSED1).
- Loop only (1) oldest order (skip 1 order) and write to variable (ORDERCLOSED2).
- Loop only the (1) oldest order (skip 2 orders) and write to the variable (ORDERCLOSED3).
I would like to know where am I going wrong, and how should I fix it?

-
That is a little complicated to understand what is happening, set a simple test project, add a shared link rather than pictures. once per bar put V2 into V1 then bar open into V1, put variables into a comment, this you can then watch on back test, then if you want add more variables. This way you will know what to do to acheve what yyou want.
-
@jstap but have project link in this post
https://fxdreema.com/shared/O7P4ykyyc -
That is not a simple test project, multiple pink blocks under another is not (to me), a good ides. As I said set up a simple test project, evert time a variable is saved it needs to have moved other variable information.
-
@jstap

Acredito que eu consegui algo, vou testar e ver se atende ao que eu preciso, muito obrigado pela sua ajuda até o momento.