Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 298

 
artmedia70:
What's with all the name-calling ... How long can we finally go from end to end...
The Artemis-Femis teaser!
 
Excuse me please!!! Yes, I need to read more carefully!
 
 
Vladimirovits:


It's about time you upgraded ;)


Cheapest ssempron/celeron, but more recent, on AM2/LGA775 at least. Installer doesn't work with processors which don't support SSE2.

 
Yeah, I'll google what it is. Thank you! (chuckles)
 
Refresh-refresh, but what to do now? There must be some reasons and solutions on this computer
 
Vladimirovits:
Upgrade - upgrade, but what to do now? There must be some reasons and solutions on this computer
Install the terminal on a more modern computer and copy the installed one to yourself, maybe that will work.
 
Thank you!!!
 
artmedia70:
Yep. Interesting to see

I solved the problem of different number of bars in the windows of one instrument.

I simply add the required number of bars to the Bars variable and the chart shifts.

But if the tester doesn't lie GREATLY, it looks like it does exist.

One complex condition consisting of 4 simple conditions and opening an order with a fixed stop and profit.

And this complex condition with slight variations is repeated many times.

The biggest risk is very rarely getting more than 1 stop in a row. (250 to 400 pips),

.http://clip2net.com/s/6if1Gm (from 2000 to 2014) TESTER

http://clip2net.com/s/6if2PS

The number of trades can be brought to an average of 2-3 every week(and all without stops)

Or maybe 1 trade a day and the same without stops.

 

Folks! Please help with the code!!! This is my first EA!!! I've been struggling with one error for 3 hours !!!!!!!!!!! Error: end of program unbalanced left parenthesis!!!!

//+------------------------------------------------------------------+
//| Nevalyashka_BOT.mq4 |
//| Copyright 2013, MetaQuotes Software Corp. |
//| https://www.metaquotes.net/ |
//+------------------------------------------------------------------+
#property copyright "Copyright 2013, MetaQuotes Software Corp.
#property link "https://www.metaquotes.net/"
#property indicator_buffers 2
#property indicator_color1 Green
#property indicator_color2 Red
#property indicator_width1 2
#property indicator_width2 2


extern int Bars_To_Count = 400;
extern int int Arrow_dis_from_can = 2;//points
extern bool play_sound = true;
extern string sound_name = "Red Alert";
extern double lots =0.1;
extern int SlipPage =30;
extern int StopLoss =250;
extern int TrailingStop =220;
extern int TrailingStep =1;
extern string comment = "NaVaLyaShka wins;
extern int Magic =777;


double buf_up[];
double buf_down[];
double up;
double down;
int bars_cheked;
int ticket;
int Sl;
int i;

//+------------------------------------------------------------------+
//| expert initialisation function |
//+------------------------------------------------------------------+
void init()
{
SetIndexBuffer(0,buf_up);
SetIndexArrow(0,233);
SetIndexStyle(0,DRAW_ARROW);

SetIndexArrow(1,234);
SetIndexBuffer(1,buf_down);
SetIndexStyle(1,DRAW_ARROW);


if (Digits ==3 || Digits ==5)
{
StopLoss*=10;
SlipPage*=10;
TrailingStop*=10;
TrailingStep *=10;
}
}

//+------------------------------------------------------------------+
//| expert deinitialisation function |
//+------------------------------------------------------------------+
void deinit()
{


}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
void start()
{
for(int h=1;h<Bars_To_Count-bars_cheked;h++)
{
/////////up
if(Open[h]<Close[h])
{
for(int u=h+1;u<Bars_To_Count+1;u++)
{
if(Open[u]!=Close[u])
break;
}

if(Open[u]>Close[u])
{
Sl=NormalizeDouble(Ask-StopLoss*Point,Digits);
ticket=OrderSend(Symbol(),OP_BUY,lots,Ask,SlipPage,comment,Magic,0,indicator_color1);
if (ticket>0)
{
if (OrderSelect(ticket,SELECT_BY_TICKET, MODE_TRADES) ==true)
{
OrderModify(ticket,OrderOpenPrice(),Sl,0,0);
}
buf_up[h]=Low[h]-Arrow_dis_from_can*Point;

}
}
}

//+------------------------------------------------------------------+
void Trailing;

{

for(int i=0; i < OrdersTotal(); i++)
{
(if(OrderSelect(i,SELECT_BY_POS, MODE_TRADES))
{
if(OrderSymbol() == Symbol() && OrderMagicNumber() == Magic)
{
if (OrderType() == OP_BUY)
{
if (Bid-OrderOpenPrice() > TrailingStop*Point)
{
if (OrderStopLoss() < Bid - (TrailingStop + TrailingStep)*Point)
{
Sl=NormalizeDouble(Bid-TrailingStop*Point,Digits);
if (OrderStopLoss() !=Sl)
{
OrderModify(OrderTicket(),OrderOpenPrice(),Sl,0,0);
}
}
}
}

}
if (OrderType() == OP_SELL)
{
if (OrderOpenPrice()-Ask > TrailingStop*Point)
{
if (OrderStopLoss() > Ask + (TrailingStop + TrailingStep)*Point)
{
Sl=NormalizeDouble(Ask+TrailingStop*Point,Digits);
if (OrderStopLoss() !=Sl)
{
OrderModify(OrderTicket(),OrderOpenPrice(),Sl,0,0);


}
}
}

}
}
}

}
}
//+------------------------------------------------------------------+

////////down
if(Open[h]>Close[h])
{
for(int e=h+1; e < Bars_To_Count+1; e++)
{
if(Open[e]!=Close[e])
break;
{


if(Open[e]<Close[e])
{
Sl=NormalizeDouble(Bid+StopLoss*Point,Digits)
ticket=OrderSend(Symbol(),OP_SELL,Bid,Bid,SlipPage,comment,Magic,0,indicator_color2);
if (ticket>0)
{
OrderModify(ticket,OrderOpenPrice(),Sl,0,0);
buf_down[h]=High[h]+Arrow_dis_from_can*Point;
}
}
}//end
}
}
}

Reason: