hello,
i am making an EA by Forex EA generator i m new and i am getting this eror please help me,
Before posting please read some of the other threads . . . then you would have seen numerous requests like this one:
Please use this to post code . . . it makes it easier to read.
Please edit your post or it will be deleted.
hello,
i am making an EA by Forex EA generator i m new and i am getting this eror please help me,
Now it is OK?
Still looks same. Doubt if you know how to use SRC.
Do this to edit your initial post ->> When you click on SRC, a sub-window will pop-up. Paste your code there and click insert. Then click submit.
hi find above. sorry for my mistake before
pls help i got below error
'\end_of_program' - ending bracket '}' expected (143, 1)
'\end_of_program' - unbalanced left parenthesis (143, 1)
hi find above. sorry for my mistake before
pls help i got below error
'\end_of_program' - ending bracket '}' expected (143, 1)
'\end_of_program' - unbalanced left parenthesis (143, 1)
Thank you for re-posting your code :-)
You need to count your opening and closing { } braces . . . you have one or more missing.
Try looking in this area, there is something wrong there . . . .
// IfOrderDoesNotExist5(); { // <---- why this opening brace ? bool exists = false; for (int i=OrdersTotal()-1; i >= 0; i--) if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
and where is the matching closing } brace for this ?
if (exists == false) { // <--- where is the closing brace for this ?
#property copyright "Copyright © 2011, Etasoft Inc. Forex EA Generator v4.1" #property link "http://www.forexgenerator.com/" #include <stdlib.mqh> #include <WinUser32.mqh> // exported variables extern double BuyLots4 = 0.1; extern int BuyStoploss4 = 20; extern int BuyTakeprofit4 = 30; int rsi15 =0; int rsi10= 0 ; int rsi80= 0; int rsi42= 0; int rsi62 = 0; // local variables double PipValue=1; // this variable is here to support 5-digit brokers bool Terminated = false; string LF = "\n"; // use this in custom or utility blocks where you need line feeds int NDigits = 4; // used mostly for NormalizeDouble in Flex type blocks int ObjCount = 0; // count of all objects created on the chart, allows creation of objects with unique names int current = 0; //double rsi15, rsi10,rsi80,rsi42,rsi62; int init() { NDigits = Digits; if (false) ObjectsDeleteAll(); // clear the chart Comment(""); // clear the chart } // Expert start int start() { if (Bars < 10) { Comment("Not enough bars"); return (0); } if (Terminated == true) { Comment("EA Terminated."); return (0); } if (true == false && false) PipValue = 10; if (true && (NDigits == 3 || NDigits == 5)) PipValue = 10; bool exists = false; for (int i=OrdersTotal()-1; i >= 0; i--) if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) { if (OrderType() == OP_BUY && OrderSymbol() == Symbol() && OrderMagicNumber() == 1) { exists = true; } } else { Print("OrderSelect() error - ", ErrorDescription(GetLastError())); } if (exists == false) { if (iRSI(Symbol(), NULL,4,PRICE_CLOSE,0) < 15) {rsi15 = 15;} if((iRSI(Symbol(), NULL,4,PRICE_CLOSE,0) < 80 || (iRSI(Symbol(), NULL,4,PRICE_CLOSE,0) >78) {rsi80 = 80;} if(iRSI(Symbol(), NULL,4,PRICE_CLOSE,0) > 80) { rsi80 = 90;} if(iRSI(Symbol(), NULL,4,PRICE_CLOSE,0) < 44 || (iRSI(Symbol(), NULL,4,PRICE_CLOSE,0) > 42) { rsi42 = 42;} if(iRSI(Symbol(), NULL,4,PRICE_CLOSE,0) < 64 || (iRSI(Symbol(), NULL,4,PRICE_CLOSE,0) >62) {rsi62 = 62;} if(iRSI(Symbol(), NULL,4,PRICE_CLOSE,0) < 10) { rsi10 = 10;} if (iRSI(Symbol(), NULL,4,PRICE_CLOSE,0) < 80) { rsi80 = 80;} } if(rsi15 = 15 && rsi42 = 42) { double SL = Ask - BuyStoploss4*PipValue*Point; if (BuyStoploss4 == 0) SL = 0; double TP = Ask + BuyTakeprofit4*PipValue*Point; if (BuyTakeprofit4 == 0) TP = 0; int ticket = -1; if (true) ticket = OrderSend(Symbol(), OP_BUY, BuyLots4, Ask, 4, 0, 0, "My Expert", 1, 0, Blue); else ticket = OrderSend(Symbol(), OP_BUY, BuyLots4, Ask, 4, SL, TP, "My Expert", 1, 0, Blue); if (ticket > -1) { if (true) { OrderSelect(ticket, SELECT_BY_TICKET); bool ret = OrderModify(OrderTicket(), OrderOpenPrice(), SL, TP, 0, Blue); if (ret == false) Print("OrderModify() error - ", ErrorDescription(GetLastError())); } } else { Print("OrderSend() error - ", ErrorDescription(GetLastError())); } }
I changed it but still
can you please copy paset it and compile in your meta trader?
and suggest me
Thanks
I changed it but still
can you please copy paset it and compile in your meta trader?
and suggest me
Thanks
Yes I can, but why can't you count the braces ? I can see the problem just by looking at your posted code . . . for each opening brace { you need a matching } brace . . .
Where is the matching closing brace for this . . .
// Expert start int start() {
and this . . .
if (exists == false) {
And while you are reading, can you explain what this code does ?
if (true == false && false) PipValue = 10;
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hello,
i am making an EA by Forex EA generator i m new and i am getting this eror please help me,