Set the day of the expected news via input parameter and run it that day.Hey guys,
I am using AmazingEA-1[1].1.8.NEW.mq4 and it isnot working.it's simply shutdown.it says "experts is disabled because it is not day of expected news" what i do?
No, sorry. I am not going to implement that modification. I will help you though if you pinpoint some specific problem with MQL code you cannot get through.Any thoughts yet on my request?
I'm trying to make amazing EA a better One, since as it is right now, it will only loose money for everybody in the long-run, Can you please help me make the modification as I requested in my previous post (post #71).
Thank you.
No, sorry. I am not going to implement that modification. I will help you though if you pinpoint some specific problem with MQL code you cannot get through.
void [B]OpenBuyStop[/B]()
{
int ticket,err,tries;
tries = 0;
if (!GlobalVariableCheck("InTrade")) {
while (tries < 3)
{
GlobalVariableSet("InTrade", CurTime()); // set lock indicator
ticket = OrderSend(Symbol(),[B]OP_BUYSTOP[/B],LotsOptimized(),[B]ho,1,hso,htp[/B],TradeComment,Magic,0,Green);
Write("[B]OpenBuyStop[/B], OrderSend Executed, ticket="+ticket);
GlobalVariableDel("InTrade"); // clear lock indicator
if(ticket<=0) {
Write("Error Occurred : "+ErrorDescription(GetLastError())+" BuyStop @ "+[B]lo[/B]+" SL @ "+[B]lso[/B]+" TP @"+[B]ltp[/B]);
tries++;
} else tries = 3;
}
}
}
void [B]OpenSellStop[/B]()
{
int ticket,err,tries;
tries = 0;
if (!GlobalVariableCheck("InTrade")) {
while (tries < 3)
{
GlobalVariableSet("InTrade", CurTime()); // set lock indicator
ticket = OrderSend(Symbol(),[B]OP_SELLSTOP[/B],LotsOptimized(),[B]lo,1,lso,ltp[/B],TradeComment,Magic,0,Red);
Write("[B]OpenSellStop[/B], OrderSend Executed, ticket="+ticket);
GlobalVariableDel("InTrade"); // clear lock indicator
if(ticket<=0) {
Write("Error Occurred : "+ErrorDescription(GetLastError())+" [B]SellStop[/B] @ "+[B]ho[/B]+" SL @ "+[B]hso[/B]+" TP @"+[B]htp[/B]);
tries++;
} else tries = 3;
}
}
}
void DoModify()
{
for (int i = 0; i < OrdersTotal(); i++) {
OrderSelect(i, SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol()==Symbol() && (OrderMagicNumber() == Magic) && (OrderType()==[B]OP_BUYSTOP[/B])) {
if ((OrderOpenPrice()>[B]ho[/B]) || (OrderOpenPrice()<[B]ho[/B])) {
Write("[B]Buy Stop[/B] was @ "+DoubleToStr(OrderOpenPrice(),5)+", changed to "+DoubleToStr([B]ho[/B],5));
OrderModify(OrderTicket(),[B]ho,hso,htp[/B],0,Green);
}
}
if (OrderSymbol()==Symbol() && (OrderMagicNumber() == Magic) && (OrderType()==[B]OP_SELLSTOP[/B])) {
if ((OrderOpenPrice()>[B]lo[/B]) || (OrderOpenPrice()<[B]lo[/B])) {
Write("[B]Sell Stop[/B] was @ "+DoubleToStr(OrderOpenPrice(),5)+", changed to "+DoubleToStr([B]lo[/B],5));
OrderModify(OrderTicket()[B],lo,lso,ltp[/B],0,Red);
}
}
}
}
We use essential cookies to make this site work, and optional cookies to enhance your experience.