help- I do not update the lot (Bucket of Positions) well
-
Hello. Well that.
I try to make a comment that indicates the lots that I have in long and short.
As lots are added, it takes it into account, and as I close, when there are no more open lots, I have lots to close.
I attach the project and a screenshot.
I'm going crazy and can't find the error. Can someone help me and correct it.
Thank you
-
@cdt If I understand it correctly you just need to see the current OPEN lots. Is that correct? Not the closed ones. Right?
-
@l-andorrà Yeah that's right.
I want to see lots open for buy and lots open for sale -
@cdt Then you will need two variables. One for each value and do this:
https://fxdreema.com/shared/5cn2RZTOc
Obviously you can add more conditions if necessary.
-
@l-andorrà
first of all thank you for your help.
It does not work for me, as you can see in the screenshot that I have attached I have several sell lots, and the comment is not at 0.

apart from this I have a couple of doubts
1- Why do you reset the variables buy_lote = 0 and sell_lote = 0 (box 4) continuously at each tick?2-what is the difference between For each Trade, and Bucket of Positions how i was trying to use.

would this not work?
gracias -
@cesar_defez
Solved.
The problem was solved by adding the condition to set the variables to zero.
I upload the project in case you are interested.shared/J7qxLglUc
Thank you -
@cdt thanks for sharing..
-
@cdt Good for you.