PARTIAL CLOSE
-
@kestra SIR! PLS I WANT TO SAY, IF THERE ARE 3 OR MORE THAN 3 TRADES ON AND THE TRADES WOULD CERTAINLY BE ON DIFFERENT BARS, BUT BASICALLY TRADES ARE ON , WHICH OF THESE SHOULD I USE ?

-
-
@kestra I need to tale a look at the current project. Can you please share the link to it?
-
@l-andorrà OK! ACTUALLY WHAT I WANT IS THAT, WHEN THE TRADE IS 3 OR MORE IT SHOULD CLOSE THE OLDEST TRADE FIRST, BUT WHEN ITS 2 TRADES AND LESS IT SHOULD CLOSE THE NEWEST TRADE FIRST. https://fxdreema.com/shared/pdj6r9knd. THANKS SIR!.
-
-
@kestra All those 'For each trade' blocks are unnecessar because there is an 'If trade' block on top. You can remove them.
-
@l-andorrà WHY I PUT THE FOR EACH TRADE IS BECAUSE, OF THE NEWEST AND OLDEST PART OF IT. SO WHEN THE TRADES ARE 3 AND ABOVE I WANT IT TO CLOSE THE OLDEST TRADES FIRST AND WHEN THE TRADES ARE 2 AND BELOW I WANT IT TO CLOSE THE NEWEST TRADE FIRST WOULD THAT WORK ?. SO YOU MEAN I CAN USE CHECK TRADE COUNT TO COUNT THE NUMBERS OF THE TRADE.
-
@kestra Ok. Isee. But in tis current position all trades wil be closed, not only the last 3 ones as you say. If you want that you should specify the maximum amunt of trades to be checked on the 'no more tna n trades' box instead.
-
@l-andorrà SIR! I DON'T UNDERSTAND WHAT YOU MEAN. BUT WHAT I MEANT IS THAT, ONCE THERE IS THE CLOSING SIGNAL, IT SHOULD CLOSE ALL, BUT IF THE TRADE IS MORE THAN 3, IT SHOULD START CLOSING FROM THE OLDEST TRADE, BUT IF ITS 2 TRADES BELOW IT SHOULD START CLOSING FROM THE EARLIEST TRADE.
-
@kestra The you need to specify that number of trades into a condition block. Basically you need two different managing block trees: one for more than 3 open trades and another one for 2 o less. Than you can use different closing configurations.
-
@l-andorrà OK SIR!.
-
@l-andorrà PLEASE SIR, HOW WOULD I FILL THIS, I DON'T WANT TO SKIP ANY TRADE, I WANT IT TO APPLY TO EVERY SINGLE TRADE, AND ALL TRADES.

-
@kestra Specified is just the chart symbol EA is on, any symbol will work on all, magic number will also control this, 0 is for manually placed.
-
@l-andorrà OK SIR!. i meant the loop settings! based on this;;;; HOW WOULD I FILL THIS, I DON'T WANT TO SKIP ANY TRADE, I WANT IT TO APPLY TO EVERY SINGLE TRADE, AND ALL TRADES.
-
@kestra The only way to not skip any trade is just leaving that space blank as per your screenshot. However, selecting some trades before other is way more complicated. You will need some custom code to create a vectorial matrix in order to do what you want. I'm afraid you will need a programmer for it.
-
@l-andorrà SIR I AM NOT SKIPPING ANY TRADE. LET ME EXPLAIN WHAT I WANT TO BUILD TO YOU! IF BULL CANDLE SHOWS, AND THERE ARE BUCKET OF TRADES >= 3 RUNNING, I WANT TO START CLOSING TRADES FROM THE OLDEST. IF BULL CANDLE SHOWS, AND THERE ARE <= 2 TRADES RUNNING, I WANT TO START CLOSING FROM THE NEWEST TRADE.
-
@kestra Apparently that should not be difficult, but are you selecting sell trades closed only or any open trades?
-
@l-andorrà SELL TRADES ONLY, AND FOR BUY TRADES TOO WHEN BEAR CANDLE SHOWS . THE CLOSING DIRECTION IN TERMS OF NUMBERS OF TRADES ARE THE SAME. THE CLOSING DIRECTION IS MY MAJOR CHALLENGE, NEWEST TO OLDEST AND OLDEST TO NEWEST!.
-
-
@kestra Then you can try this:
