how to get this indicator color to ea?

[Deleted]  

hello every body..

i have this indicator...

this indicator display blue and red color..

i want if have appear blue color, so the next bar open buy ..

but can not take his color..


my code like this:

int start()
{
int ticket;
double se = iCustom(NULL,0,"SuperSimple~",0,1);
double se1 = iCustom(NULL,0,"SuperSimple~",1,1);
double se2 = iCustom(NULL,0,"SuperSimple~",2,1);

double se3 = iCustom(NULL,0,"SuperSimple~",3,1);


if( se==0 )
{
ticket=OrderSend(Symbol(),OP_BUY,Lots,NormalizeDouble(Ask,4),3,NormalizeDouble(Ask-StopLose,Digits),NormalizeDouble(Ask+TakeProfit,Digits),0,Green) ;
}

return(0);

}


but it open random include blue color and red color..

so, how should i do?

thx..

 

1) http://www.lmgtfy.com/?q=site%3A+mql4+icustom

2) Hint: each color in indicator is stored ina different buffer.


ifStillFail: read the book, lear to code, or pay.

[Deleted]  

ya, i have try like:

se ==0 && se1==0 && se2 ==0 && se==0


but not display result..

from that indicator have 4 buffer:

IndicatorBuffers(4);
SetIndexStyle(0, DRAW_HISTOGRAM, STYLE_SOLID, 2);
SetIndexBuffer(0, g_ibuf_100);
SetIndexStyle(1, DRAW_HISTOGRAM, STYLE_SOLID, 2);
SetIndexBuffer(1, g_ibuf_104);
SetIndexBuffer(2, g_ibuf_92);
SetIndexBuffer(3, g_ibuf_96);
IndicatorShortName("SS2009_C(" + SSP + ")");

return (0);


i can not get right color..

is that buffer means color or not?

as i know setindexstyle =0 is blue color, so mean g_ibuf_100 is blue color

so i make :

double se = iCustom(NULL,0,"SuperSimple~",0,1);

if se==0, is mean blue color, but open position follow red color too..

why is like that?