COUNT sell and buy signal.

 

Hi! NEWBIE HERE!

I just want to ask.. if how to code this;


how to COUNT ALL SELL SIGNAL before proceeding to trade.Sell.


Ex. 

SELL COUNT =  5

execute trade.sell


SELL COUNT = 4

don't proceed to trade.sell


thank u!

 
Here is the list of all functions there you can find what you need incl. some examples: https://www.mql5.com/en/docs/function_indices
Documentation on MQL5: List of MQL5 Functions
Documentation on MQL5: List of MQL5 Functions
  • www.mql5.com
List of MQL5 Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 

You have to code an EA where you count those signals when they are detected (with some predefined counters – you need to manage them properly to avoid overwriting or missing some data) or go through history and count those signals on historical candles (this way it doesn’t depend on restarting the EA etc.) Then if counter show proper number the trade can be performed, and counter should be reset.

Reason: