Detect any condition has already meet

 
do
{
        int entry_buy()
        {
        Close[0]>Main_Trend;
        Close[0]>Sub_Trend;
        Close[0]>Third_Trend;
        Close[0]>Fourth_Trend;
        Close[0]>Fifth_Trend;
        Close[0]>Sixth_Trend;
        Close[0]>Seventh_Trend;
        Close[0]>Eighth_Trend;
        Close[0]>Ninth_Trend;
        Close[0]>Tenth_Trend;
        }
        int entry_sell()
        {
        Close[0]<Main_Trend;
        Close[0]<Sub_Trend;
        Close[0]<Third_Trend;
        Close[0]<Fourth_Trend;
        Close[0]<Fifth_Trend;
        Close[0]<Sixth_Trend;
        Close[0]<Seventh_Trend;
        Close[0]<Eighth_Trend;
        Close[0]<Ninth_Trend;
        Close[0]<Tenth_Trend;
        }
   
}
while(entry_buy() >= 4 )
{
  signal = TRADE_SIGNAL_BUY;   
}
while(entry_sell() >= 4 )
{
    signal = TRADE_SIGNAL_SELL;
}

Consider that I already declared the indicator of Main_Trend, Sub_Trend and so on.

Trade_signal_Buy = OrderSend(buy)

TRADE_SIGNAL_SELL = OrderSend(sell)

I have a question related to proceed OrderSend if any 4 of the condition meet.


For example:
if price close above, Main_Trend, Fifth_Trend, Eighth_Trend and Tenth_Trend if will place a buy order.
so what I want is it will detect any 4 or above Trend already meet condition then proceed to next step.

I hope I do it correctly

 
  1. Please edit your (original) post and use the CODE button (Alt-S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum 2019.05.06
              Messages Editor

  2. Close[0]>Fifth_Trend;
    Statement is a bool — has no effect. Does this code even compile?
  3. do
    {
            int entry_buy()
            {
    Do not post code that will not even compile. You can not define a function inside other code.