Jump to content

⤴️-Paid Ad- Check advertising disclaimer here. Add your banner here.🔥

Recommended Posts

Posted

at normal market condition last candle close is equal to open for current candle and if you add 1 or 2 pips difference then it would be a very normal bull and bear candle. can you be more specific, ie. volume, wick, candle formation.. etc.

i use arrow instead of line because it easier to see, there would be too many line.

the code

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Black
#property indicator_color2 White

double EqualOC[], EqualCO[];

int init()
 {
  string sShortName;
  SetIndexBuffer(0,EqualOC);
  SetIndexBuffer(1,EqualCO);

  SetIndexStyle(0,DRAW_ARROW);
  SetIndexArrow(0,116); 
  SetIndexStyle(1,DRAW_ARROW);
  SetIndexArrow(1,116); 

  return(0);
 }


int start()
 {
  int limit;
  int counted_bars=IndicatorCounted();
  if(counted_bars>0) counted_bars--;
  limit=Bars-counted_bars;
  for(int i=0; i<limit; i++)
    {
     EqualOC[i]=0;
     EqualCO[i]=0;
     if(
        (Open[i+1] <= Close[i+1]) && 
        (Close[i+1] == Open[i]) && 
        (Close[i] <= Close[i+1])
       ){EqualOC[i] = High[i];}
       
     if(
        (Open[i+1] >= Close[i+1]) && 
        (Close[i+1] == Open[i]) && 
        (Close[i] >= Close[i+1])
       ){EqualCO[i] = Low[i];}
    }
  return(0);
 }

Posted

Hi Friend,

 

thank you for your reply, could you send mq4 file?

i try to compile by self your code above and attach to chart but nothing appear on my screen

 

thank you very much

Posted

the code is working just fine... the only reason is your broker never give you last close equal to open for current bar.. =))

i try it on my 3 different broker, on M15 AUDUSD at In*******x broker, I just get 1 arrow at may 9, 2012 at 21:00, while on Fx**o and I**x just like star sparkling on the sky.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


⤴️-Paid Ad- Check advertising disclaimer here. Add your banner here.🔥

×
×
  • Create New...