Help with EA programming

Back to topics list To post a new topic, please log in or register
avatar
17
MF10000 2015.04.05 02:08
 

Hello,

Im  programming an EA and i want to use custom indicator so I using the iCouston function.The problem is that this indicator is colors and not numbers(when its black buy and when its whit sell for example).

How i turn this colors to signels that well tell the EA when to open order? How I writ if function with colors and not a nomber?

 

avatar
Moderator
3427
GumRai 2015.04.05 03:12 #
 

If the indicator uses buffers, if you open the data window, you will see the different buffer values for 0,1,2 etc

You should be able to work out what combination of values/lack of values equate to a buy or a sell signal. 

avatar
17
MF10000 2015.04.05 10:14 #
 

Thank you for your answer,

I found the buffer values,but when I'm write if function  like this:

 

int start ()

{

  

double Buy2_2 = iCustom (NULL, 0 ,"superscalper05" , 0 , 0);

double Buy2_1 = iCustom (NULL, 0 ,"superscalper05" , 2 , 2);

 

 if (Buy1 < Sell1)

  OrderSend(NULL,0,1,Ask,1,StopLoss,TakeProfit,NULL,MagicNumber,Green,Green);

 

return(0);

}
It dosent work.I attached the indicator.
Attached files:
  superscalper05.ex4  (11.35 KB)
avatar
Moderator
3427
GumRai 2015.04.05 13:34 #
 
int start ()

{

  

double Buy2_2 = iCustom (NULL, 0 ,"superscalper05" , 0 , 0);

double Buy2_1 = iCustom (NULL, 0 ,"superscalper05" , 2 , 2);

 

 if (Buy1 < Sell1)   //What are these 2 variables and where do they get their values???

  OrderSend(NULL,0,1,Ask,1,StopLoss,TakeProfit,NULL,MagicNumber,Green,Green);

 

return(0);

}

avatar
17
MF10000 2015.04.05 15:21 #
 

Excuse me,my mistake.this is what I ment:

int start ()

{

  

double Buy2_2 = iCustom (NULL, 0 ,"superscalper05" , 0 , 0);

double Buy2_1 = iCustom (NULL, 0 ,"superscalper05" , 2 , 2);

 

 if (Buy2_2 < Buy2_1)

  OrderSend(NULL,0,1,Ask,1,StopLoss,TakeProfit,NULL,MagicNumber,Green,Green);

 

return(0);

}

 

Back to topics list  

To add comments, please log in or register