how to limit trades number of trades
-
hey,
id like to limit the amount of trades taken after an ema cross. so once the ema's cross in favour of my strategy i want to limit the trades taken ideally to no more that 4. then i dont want the ea to start trading again until the emas have crossed over each other twice (so if the trades were taken short, i want the emas to cross heading up and then cross back heading down again). the idea being is that it will stop trading approaching phase 2 and then it doesnt start trading again until phase 1 starts. any ideas on how to do this? thanks in advance
-
@ashley111 use check trades count block and you can even set it separately for only buys and sells in filter by type parameter

-
@zackry thanks dude. so where do i put this block? or can it run on its own like an 'if trade' or 'no trade'?
then do i just put a condition on the orange that has the ema cross in and then hook that orange up to the grey on the no trade block at the start of the strategy? (so that it begins trading again after the cross?
sorry for all the questions
-
@ashley111 I would have used it above the Ema cross conditions so it won't run any block below the check trade count block , but considering you also want the ea to keep tabs on the Ema cross and trade accordingly so I think it's best to use this block right above the buy and sell block. But you are gonna need to put a check flag true/false block right above the trade count block, and also use a set flag true false right below the Ema cross blocks so that when the Ema conditions change and revert back again ea takes trade again, and don't forget to set the flag to false again once the four trades are done
-
-
If you mean these two blocks, then they are just normal "check trade count" blocks, they are just named this way,
-
@zackry yeah but it seems not working since i had added the ''check position count''. i mean it places no trade since then
-
Could you please share your project? Probably theer must be something in the blocks tha's stopping them.
-
-
@fxadels Keep Buy and Sell path seperated! The trade count block only makes sense if the EA can open more than one trade, which doesn't seem to be possible due to block 1 (No position).
-
Trader.philips is right. Just duplicate buy and sell structures and make them work independently.

