Closing bucket of trades
-
I'm trying to set a funtion that closes my group trades after a profit is reached.
Used purple block, "bucket of trades" for nuy and one for sell orders, then linked to "check profit" pink block, and then this one linked to pink "close" block.
The check profit is true when profit is = or greater than the amount I want, but it is not working. Also included a block to close the pending orders when closing the active ones. Attached image.I wonder if these blocks should be connected to any other one to pass, or how to make this work?
Any other idea to close group or active and pending trades of one group, after a profit is reached?
Thanks
......
buckets.jpg -
I made "Bucket" blocks for people who want to get some calculated value, like the sum of all profits or similar stuff. These blocks only create a list of trades and that's all. Then, in Condition the value is calculated. Min, Max, Total or Average balue. These blocks has nothing to do with pink blocks. Pink blocks work in this "for each" manner. For pink block use one of the "For each..." blocks above. There are some examples here - LINK
-
Thank you... but "for each trade" does not help, as I want to check profit of my basket of trades. If profit is at desired level, then close the trades.
What block you suggest to use instead for the whole group, not for each trade?
__I made "Bucket" blocks for people who want to get some calculated value, like the sum of all profits or similar stuff. These blocks only create a list of trades and that's all. Then, in Condition the value is calculated. Min, Max, Total or Average balue. These blocks has nothing to do with pink blocks. Pink blocks work in this "for each" manner. For pink block use one of the "For each..." blocks above. There are some examples here - LINK[/quote:3nfcua6u]
-
Check profit (unrealized) - Close trades
-
__Check profit (unrealized) - Close trades[/quote:hb2teys2]
You mean same way I have it but dropping the purple box? I'm working with a group of trades, not just one.
What about if want to have separate process for buys and sells, so that when closing when in desired profit, it closes pending orders as well?
-
Look at the properties of these blocks. In both of them you can choose Group, Market and Type. This means that you can check the total unrealized profit of certain group of trades and then close those trades. The settings in both blocks must match.
"Close trades" does not close pending orders. There is "Delete pending orders" for pending orders. By "trades" I mean running orders (positions or however you call them), not pending orders. By orders I mean... mostly pending orders.