How to detect more than one position on the same symbol on a positions loop
-
Hi,
I would like to know a way to to detect if there is more than one position of the same symbol on a positions loop.The check positions count isn't usable due to it only works on a specific symbol or all.
Thanks.
-
you can use Bucket menu
-
@nilsen Do you mean a kind of 'open trades counter'?
-
@l-andorrà I mean a counter of open trades of the same symbol
-
@xfire thanks for the suggestion but market name isn't available there so it isn't useful for what I'm looking for
-
@nilsen You can try this:
-
@l-andorrà thanks for this, but I need to count how much trades for each symbol, not all together like on your script.
Concretely, I need to close a trade if there exist another one for the same symbol. -
@nilsen Well, if you look carefully within that 'Foer each trade' block you will see a 'Filter by symbol' display. Click on it and then you will see 'Specified' option by default. That means only the trades of that symbol will be considered.
-
@l-andorrà yes I know but I want to compare lots of positions of different symbols and my intention is not to specify one by one..
-
@nilsen You mean you can have many open trades from different charts at the same time and then you want to know how many belonging to a specific one are open right now. Correct? That I can understand but I can't see why can't you use the 'Any symbol' option. Isn't that supposed what you are looking for?