Salve a tutti allora devo usare i livelli delle medie in un EA ora ho inserito questo codice
PHP Code:
input int Level_Positivo_Up_Sell      = +800;
input int Level_Negativo_Down_buy     = -800;

  
​​​​​​double Ma iMA(NULL0MediaPeriod0TipoMediaPRICE_CLOSE0);
  
bool ticket;
  
double  SellBuy;
  
Buy Ma +  (Level_Negativo_Down_buy Point());
  
Sell Ma +  (Level_Positivo_Up_Sell Point());

    
int BuySell=0;
        if((
BuySell != -1)&&(Close[0]< Open[0]) && (Open[0] > Sell && Close[0] < Sell ))//sell
           
{
            
BuySell =-1;
         ....
           }
         if((
BuySell != 1)&&(Close[0]> Open[0] && Close[0]<Buy && Open[0]>Buy))  //buy
           
{
            
BuySell =1;
           }
        } 
secondo voi perchè entra solo nella condizione sell?
Attached Files