EUJPY M5 on 2017/04/27:
First time error 130 second time ok....don t know why...cause there is NO SL!!!!
Attached the mq4 to the post!
First time error 130 second time ok....don t know why...cause there is NO SL!!!!
Attached the mq4 to the post!
QuoteDislikedint ticketNo = 0;
double actSpread = 0.0;
//**********************************************************************************************************************************************************
// init
//**********************************************************************************************************************************************************
int init() {
Print("================================================================================================ start ");
return (0);
}
//**********************************************************************************************************************************************************
// denit
//**********************************************************************************************************************************************************
int deinit() {
return (0);
}
//**********************************************************************************************************************************************************
// start
//**********************************************************************************************************************************************************
int start() {
if (!IsTradeContextBusy()) {
actSpread = (Ask - Bid) / Point;
// Set new orders
myCalcBuySellPendingOrdersConditions();
}
return 0;
}
//**********************************************************************************************************************************************************
// myCalcBuySell
//**********************************************************************************************************************************************************
void myCalcBuySellPendingOrdersConditions() {
if (TimeToStr(TimeCurrent(),TIME_DATE|TIME_MINUTES)!="2017.04.27 16:58")
return 0;
double maVal1;
maVal1 = iMA(NULL, 0, 3, 0, MODE_LWMA, PRICE_HIGH, 0);
if (Bid > maVal1 + 60 * Point) {
int myTicketNo = 0;
myTicketNo = OrderSend(NULL, OP_SELLSTOP, 6.02, 121.187, 3, 0, 0, "", 1, 0, clrBlueViolet);
//myTicketNo = OrderSend(actSymbol, cmd, NormalizeDouble(actVolume,2), NormalizeDouble(actPrice,3), actSlippage, 0, 0, actComment, actMagicNo, actExpiration, actArrowColor);
string output="=== After Trade: Bid"+ Bid+ " "+121.187+" Order was ";
if (myTicketNo==-1)
output+="WRONG";
else
output+="OK";
Print(output+" i:"+TimeCurrent());
}
}
Attached File(s)
Error in Bengal Dream.mq4
5 KB
|
239 downloads
Vucking good EA coder... https://t.ly/AZjRM
#14 All Time Return:
552.7%