close multiple trades & reverse same # of trades
-
My algo can have multiple open positions. I want to add a feature so that when for example 5 open buys are closed I open 5 sell trades. I did this test EA using the Bucket of trades & the loop N times blocks . it does not work. The buttons open & close trades but it does not reverse the closed positions. Not sure if I am using the Bucket of trades & the loop blocks correctly
https://fxdreema.com/shared/bTL4DY2wb
Thanks -
My logic works when I put a number in the Loop pass N times block. when I use the variable that should be generated from the Bucket of trades block it does not work. Therefore my problem is that I do not understand how to use the Bucket of trades block. Any help understanding the bucket of trades block would be appreciated
Thanks

-
-
Ok Thanks, I will try that. If I understand correctly the bucket of trades does not store the trade count value in the variable directly?
-
No, i think it doesnt. If you want rewrite variable use always Formula. I use like this every time. Also you have wrong the condition pass-Bucket of Trades-Bucket of trades in pictures. It must be seperetly.

https://fxdreema.com/shared/7XXlRTYub
i also use comments that i know what happens.
try it .:-)
-
Ok I tried that It works for the buy side but I have a problem on the sell side.

-
It is now working. I updated all the blocks & re-complied & now it is OK. I still do not fully understand the relationship between the Bucket of trades & the variables But I should be able to make it do what I want. This fxdreema program is great & the community support adds a lot of value. Thanks for the help hopefully some time I can return the favour