Checking Candle Open - page 5

 
GumRai:

I am sorry, but if you have to ask this, you are trying to write code way too complicated for your knowledge level.

I can't write your code for you a bit at a time. 

Hey GumRai, no my apologies--that was a seriously dumb question. Idk how I read your suggestion, but I imagined it as something totally else. I was able to figure it out and get it working. Thanks for the help mate.
 

can anybody help me with this:


I want to create an alert only if the:

Difference between the previous open and close is greater than the difference of the current open and close

icustom is reading from Heiken ashi


  double SH2 = iCustom(NULL,0,"Heiken Ashi",2,i);                                                                     

  double BH2 = iCustom(NULL,0,"Heiken Ashi",3,i);

  

  if(SH1<BH1 && SH2<BH2 && ct==0)

  {

   UP[i]=Low[i]-distance*MyPoint;ct=1;

   if(CTime!=Time[0])

    {

     if(PopUpAlert){Alert(Symbol()," ","Buy Arrow");}

     if(EmailAlert){SendMail(Symbol()+"Buy Arrow"+"","Buy Signal");}

     if(PushAlert){SendNotification(Symbol()+"Buy Arrow"+"");}

     CTime=Time[0];

    }

  }

  if(SH1>BH1 && SH2>BH2 && ct==1)

  {

   DOWN[i]=High[i]+distance*MyPoint;ct=0;

   if(CTime!=Time[0])

    {

     if(PopUpAlert){Alert(Symbol()," ","Sell Arrow");}

     if(EmailAlert){SendMail(Symbol()+"Sell Arrow"+"","Sell Signal");}

     if(PushAlert){SendNotification(Symbol()+"Sell Arrow"+"");}

     CTime=Time[0];

    }

  }

Reason: