xb4d indicator

 
hi i use xb4d indicator for my ea & i use beffer 0 >0 for "buy" and buffer0<0 'sell'
like:
 
 if(iCustom(NULL,0,"xb4d",50,0,0)>0  
    ) 
   return("buy");
   
 else  if(iCustom(NULL,0,"xb4d",50,0,0)<0
        )
   return("sell");

but  in this coding ea send "buy" position in (buffer0<0 'sell') and oppose this.
ea work different can you help me?

 
  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
              Messages Editor

  2. Hamed Feizi: but  in this coding ea send "buy" position in (buffer0<0 'sell') and oppose this.
    That is impossible with your posted code. Use the debugger or print out your variables, and find out why.

  3. You are looking at buffer zero, bar zero. Does that actually return results while the bar is forming? Does it actually return zero for no signal, or does it return EMPTY_VALUE?
              Other constants - Named Constants - Constants, Enumerations and Structures - MQL4 Reference
 
Hamed Feizi:
hi i use xb4d indicator for my ea & i use beffer 0 >0 for "buy" and buffer0<0 'sell'
like:
 
but  in this coding ea send "buy" position in (buffer0<0 'sell') and oppose this.
ea work different can you help me?

What version is it working on?

Reason: