I've written an EA which is employed on a probability value that's recieved in an indior via the iCustom. However, this EA does not seem to be working , can anyone tell me what's wrong with this code? If anyone is interested I'll post up the last job as soon as its completed , it is a realy great EA... if it'd operate
It never seems to get into trades although the probability percent is over the desired level. Along with also the indior also never upgrades itself.
Thanks a lot !!
property copyright Copyright © 2010, MetaQuotes Software Corp..
#property link http://www.metaquotes.net
// ------------------------------------------------------------------
//| pro initialization serve |
// ------------------------------------------------------------------
extern int Open_Percentage = 80 ;
extern int Close_Percentage = 40 ;
extern int Take_Profit = 13 ;
extern int Stop_Loss = 15 ;
int PMI ;
series TI ;
int buy ;
int market ;
extern int Max_Order_Count = 1;
extern double Slippage = 3;
extern int Magic_Number = 10810 ;
extern double Lots = 0.05 ;
int init()
//--
iCustom(NULL, 0, MEGATREND PROBABILITY METER II,13,7,0) ;
//--
return(0);
int start()
//-
series Probability_Value = ObjectDescription(prop_value);
PMI = StrToDouble(StringSubstr(Probability_Value,0,Strin gLen(Probability_Value)-1));
TI = ObjectDescription(trend_comment_);
buy = StringFind(TI,LONG,0);
market = StringFind(TI,SHORT,0);
if (Open_Percentage gt; PMI)
return(0);
if(OrdersTotal() lt; Max_Order_Count)
if(PMI gt; Open_Percentage buy !) = -1)
OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,0,Ask - Stop_Loss * Point,Ask Take_Profit * Point,Magic_Number,0,Green);
if(OrdersTotal() lt; Max_Order_Count)
if(PMI gt; Open_Percentage sell ! = -1)
OrderSend(Symbol(),OP_SELL,Lots,Bid,Slippage,Bid Stop_Loss * Point,Ask - Take_Profit * Point,0,Magic_Number,0,Red);
//--
return(0);
// ------------------------------------------------------------------