PDA

View Full Version : Probability Trader EA help



polichopk
05-05-2010 13:59, 01:59 PM
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);

// ------------------------------------------------------------------

ebb95
11-21-2021 05:48, 05:48 AM
You state that the order never opens, but have you checked the error position in the journal window about the platform?

Other than that, you want to insert Print() statements throughout your code to guarantee the logic flow is as expected.

Mobem8687
11-21-2021 07:09, 07:09 AM
You should provide a factor for that worth
Inserted Code double whatever_it_is = iCustom(NULL, 0, MEGATREND PROBABILITY METER II,13,7,0);

polichopk
11-21-2021 08:29, 08:29 AM
You do have a point there lmyyyks ! I will try it definitly... Hey you still keen to do some work collectively lmyyyks sounds as you understand what your doing? I sent you an email dont know if you check ur email a lot

cheerz!

polichopk
11-21-2021 09:50, 09:50 AM
Codmeister thanks to your reply... I've infact Completed this and tried That the GetLastError() all Within my code but no errors are returned