I have a problem with EA when i started tester EA!

 

why does it shows up dpo to the chart so many times??

And

what do you think is wrong?

#include <Trade\Trade.mqh>

CTrade   trade;


void OnTick()
  {

double DPO [];


double Ask=NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_ASK),_Digits);
double Bid=NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_BID),_Digits);

 int DPO1dvul= iCustom(NULL,PERIOD_CURRENT,"dponew",24);

 CopyBuffer(DPO1dvul,0,0,3,DPO);

 
 

 if( DPO[0]<0 && DPO[1]>0 &&( OrdersTotal()==0) && (PositionsTotal()==0) ){
 
  trade.BuyStop(0.02,Ask,_Symbol,Ask-(100*_Point),Ask+(300*_Point),ORDER_TIME_GTC,0,0);
  }
 
  if(   DPO[0]>0 && DPO[1]<0 &&( OrdersTotal()==0) && (PositionsTotal()==0) ){
 
  trade.SellStop(0.02,Ask,_Symbol,Ask-(100*_Point),Bid+(300*_Point),ORDER_TIME_GTC,0,0);
 
 
  }
  

  
  }
 

Do you really know what you are doing??

And, do you really think that we have a Crystal Ball??

 
Minions Labs:

Do you really know what you are doing??

And, do you really think that we have a Crystal Ball??

yes,i know!

but i have a problem when i started tester the Expert Advisor!!

You can see this problem in the photo and the code i have write.