I can't buy/sell when I put conditions in

 
Could someone please help me ? I just started programming and I have n idea what I'm supposed to do, because the EA won't buy/sell when I putr a condition in. If my condition is "true" it works, but not with another condition, such as for example : MA1_value > MA2-value. Could some one pls help me ? My file is here attached. :)
Files:
EA_ROH.mq5  15 kb
 
  1. Please post only in English on this forum. "n", "putr", "pls" are not words.
              Please don't write ur - it's "you are" or "your" - MQL4 programming forum 2014.03.04

  2. You are supposed to fix your broken code.

    Use the debugger or print out your variables, including _LastError and prices and find out why. Do you really expect us to debug your code for you?

  3. if(MA1_value > MA2_value > MA3_value)
    True = non-zero and false = zero so you get:
    if( 3 < 2 < 1 )
    if( false < 1 )
    if(     0 < 1 )
    if(     true  )
    if( 3 > 2 > 1 )
    iftrue > 1 )
    if(     1 > 1 )
    if(     false )
    
    Your buy condition is probably false.

  4. //SELL
        if(false)
    
    Your sell condition is always false.

  5.    trade.Sell(Lot_Size,_Symbol,Bid,Bid - STOPLOSS* _Point,Bid + TAKEPROFIT* _Point,NULL);
       trade.Buy(Lot_Size,_Symbol,Ask,Ask - STOPLOSS* _Point,Ask + TAKEPROFIT* _Point,NULL);
    
    You buy at the Ask and sell at the Bid.
    1. Your buy order's TP/SL (or Sell Stop's/Sell Limit's entry) are triggered when the Bid / OrderClosePrice reaches it. Using the Ask±n, makes your SL shorter and your TP longer, by the spread. Don't you want the specified amount used in either direction?

    2. Your sell order's TP/SL (or Buy Stop's/Buy Limit's entry) will be triggered when the Ask / OrderClosePrice reaches it. To trigger at a specific Bid price, add the average spread.
                MODE_SPREAD (Paul) - MQL4 programming forum - Page 3 #25

    3. The charts show Bid prices only. Turn on the Ask line to see how big the spread is (Tools → Options (control+O) → charts → Show ask line.)
      Most brokers with variable spread widen considerably at end of day (5 PM ET) ± 30 minutes. My GBPJPY (OANDA) shows average spread = 26 points, but average maximum spread = 134.

 
Comments that do not relate to this topic, have been moved to "Off Topic Posts".