What do I have to do if I want that after close trade the previous candles do not count?
-
Suppose the EA is programmed for a moving average crossover where a sale is made when a buy is closed and vice versa, what I need is that after two negative operations it does not open the next one, that is, I do not want the candle to count when the second negative operation is closed and that in the next candle that would be "ID 0" the EA will start as if it had not made any operation before. I have tried it with the block "skip ticks" and configured as "skip for centain time" but as my candles are "renko" sometimes it doesn't work, if I configure it as "skip until certain time" it never works for me. I would be very grateful if you help me.
-
@grupodama When a trade closes set a int variable to 0, once per bar add 1 to the variable, before buy/sell check this number is high enough with a condition block, if need be count the losses before setting the variable to 0.
-
@jstap Thank you very much Jstap, I already have it solved. All the best.