Close trade when the market breaks a level - h4 candle

Vladimir Karputov  
msK146 :
Hi traders,

I'm looking for EA that closes a open trade when the market breaks a price ( added manually ) based on h4 candles, do you know something like that?

thank you very much

Do you need to close ALL positions? It matters WHERE the market breaks through H4 (the market breaks through HIGH or LOW)? Do you need to check the penetration only on the new bar?

msK146  
Vladimir Karputov:

Do you need to close ALL positions? It matters WHERE the market breaks through H4 (the market breaks through HIGH or LOW)? Do you need to check the penetration only on the new bar?


Yes i need to close all positions on the current currency,

for exemple: i sell a resistence and as soon as the market breaks the resistance on h4 close the trade is cut


is this achievable? thanks you 

Vladimir Karputov  
msK146 :

Yes i need to close all positions on the current currency,

for exemple: i sell a resistence and as soon as the market breaks the resistance on h4 close the trade is cut


is this achievable? thanks you 

I'll start today and tomorrow, I think I will have time to finish the code. There will be several options:

  • penetration timeframe
  • interval between breakthrough searches
  • penetration type (HIGH or LOW)
  • bar number on which to look for a break
Vladimir Karputov  
Vladimir Karputov :

I'll start today and tomorrow, I think I will have time to finish the code. There will be several options:

  • penetration timeframe
  • interval between breakthrough searches
  • penetration type (HIGH or LOW)
  • bar number on which to look for a break

Market breaks a price :

Utility Advisor: closes all positions by the current symbol. if the price crosses High or Low of the specified bar on the specified timeframe.