magikrat:I get the same error 130 too. It's about an illegal stop. I used the same pair, time frame and parameters and get this error.
magikrat:I get the same error 130 too. It's about an illegal stop. I used the same pair, time frame and parameters and get this error.
Unfortunately this code does not adjust for 5 digit brokers and does not check minimum stop levels, so using the original settings as is, will most probably fail.
You will have to adjust the parameters accordingly with this in mind.
Also, it uses hard coded timeframe signals and the code is somewhat flawed, so be careful and do not use this EA on a real account.
I leave a recommendation for the author, that he address these issues and polish up the code, as it is very crude.
Unfortunately this code does not adjust for 5 digit brokers and does not check minimum stop levels, so using the original settings as is, will most probably fail.
You will have to adjust the parameters accordingly with this in mind.
Also, it uses hard coded timeframe signals and the code is somewhat flawed, so be careful and do not use this EA on a real account.
I leave a recommendation for the author, that he address these issues and polish up the code, as it is very crude.
I tried testing on MT4 Build 610 but I just get Ordersend error 130 over and over
the error depend from a mistake in the code:
//Buy
if (Order == SIGNAL_BUY && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount)))) {
if(!IsTrade) {
//Check free margin
if (AccountFreeMargin() < (1000 * Lots)) {
Print("We have no money. Free Margin = ", AccountFreeMargin());
return(0);
}
if (UseStopLoss) StopLossLevel =Ask - StopLoss * Point; else StopLossLevel = 0.0; the correct code is : Bid - StopLoss * Point; else StopLossLevel = 0.0;
if (UseTakeProfit) TakeProfitLevel = Ask + TakeProfit * Point; else TakeProfitLevel = 0.0;
Ticket = OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, StopLossLevel, TakeProfitLevel, "Buy(#" + MagicNumber + ")", MagicNumber, 0, DodgerBlue);
if(Ticket > 0) {
if (OrderSelect(Ticket, SELECT_BY_TICKET, MODE_TRADES)) {
Print("BUY order opened : ", OrderOpenPrice());
if (SignalMail) SendMail("[Signal Alert]", "[" + Symbol() + "] " + DoubleToStr(Ask, Digits) + " Open Buy");
} else {
Print("Error opening BUY order : ", GetLastError());
}
}
if (EachTickMode) TickCheck = True;
if (!EachTickMode) BarCount = Bars;
return(0);
}
}
the same from sell
I tried testing on MT4 Build 610 but I just get Ordersend error 130 over and over
the error depend from a mistake in the code:
//Buy
if (Order == SIGNAL_BUY && ((EachTickMode && !TickCheck) || (!EachTickMode && (Bars != BarCount)))) {
if(!IsTrade) {
//Check free margin
if (AccountFreeMargin() < (1000 * Lots)) {
Print("We have no money. Free Margin = ", AccountFreeMargin());
return(0);
}
if (UseStopLoss) StopLossLevel =Ask - StopLoss * Point; else StopLossLevel = 0.0; the correct code is : Bid - StopLoss * Point; else StopLossLevel = 0.0;
if (UseTakeProfit) TakeProfitLevel = Ask + TakeProfit * Point; else TakeProfitLevel = 0.0;
Ticket = OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, StopLossLevel, TakeProfitLevel, "Buy(#" + MagicNumber + ")", MagicNumber, 0, DodgerBlue);
if(Ticket > 0) {
if (OrderSelect(Ticket, SELECT_BY_TICKET, MODE_TRADES)) {
Print("BUY order opened : ", OrderOpenPrice());
if (SignalMail) SendMail("[Signal Alert]", "[" + Symbol() + "] " + DoubleToStr(Ask, Digits) + " Open Buy");
} else {
Print("Error opening BUY order : ", GetLastError());
}
}
if (EachTickMode) TickCheck = True;
if (!EachTickMode) BarCount = Bars;
return(0);
}
}
the same from sell
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
exad...:
Author: jkp2277