condition fot trades (one per bar)
-
Hi
Is it possible to create condition where ea dont allow open new trade, when on the same candle few minutes ago was closed trade.
I mean, if on candle ID 1 was closed trade and after that is signal for open new trade on the same candle ID 1, ea doesnt allow open this trade and will wait for new oppourtinity in next candles -
once per bar will only allow something to happen once in a candle
-
i know but how to check that for example, on candle ID 1, trade was closed and i dont open any new trade on this candle
-
I see, when a trade closes set a double variable to 0 on the on trade tab (trade closed - modify variable), on the on tick tab once per minute add 1 to this variable every minute and check in a condition above buy/sell, if the variable number is > your minimum amount, on mt4 (maybe mt5) variable > time frame is the minutes per candle, otherwise use the number that is relevant to you