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

 
wolfovik:

Thanks, but I've decided to use a virtual stop and take for now.

There is still a problem with the long execution time of the EA. But the indicator alone works without any problems.

How can I optimise it?

Change Sall's opening in SL - to +, and in TP + to - ! Other faults cannot be ruled out ! This is only at a cursory glance! Warning !!!
 
Could you please tell me how to implement when writing an indicator that the indicator readings on the 0th bar are added to the readings on the 1st bar?
 
hmpr:
Could you please tell me how to implement when writing an indicator, so that the indicator readings on the 0th bar are added to the readings on the 1st bar?

As you like!

Close[1] = Close[1]+(Close[0]-Open[0]); //Если найдёте как вставить! Я не пробовал ещё такое ;)
 
Please tell me how to properly install an EA, more precisely, I put it in the folder: C:\Program Files (x86)\MetaTrader 4 at FOREX.com\MQL4\Experts but it does not appear in the EA, I have already tried several.
 
borilunad:

As you wish!


Close[1] он и есть Close[1]

val[1]=Close[1]+Close[0]
 
pako:

Then it's like this:

val_Close1 = Close[1]+(Close[0]-Open[0]); //он просил прибавить к первому бару не нулевой бар, а только изменение, 
                                          //т.е. разность между барами. Open[0] можно заменить на Close[1]
                                          //другой вопрос, зачем ему это надо. 
                                          //пускай экспериментирует, может, найдёт, что ищет!
 
borilunad:

Then it goes like this:


Boris, you are wrong ( :)) ).

The crux of the question: how can the value of the indicator at bar 1 be taken into account in its current value.

 
tara:


Boris, you're wrong ( :)) ).

The crux of the question: how can the value of an indicator at bar 1 be taken into account in its current value.

Alexei, don't stutter(not)! Here is his question: ". how can we implement when writing an indicator so that the indicator readings on the 0th bar add up to the readings on the 1st bar?" So the first bar will fly into the sky! I don't know why he would, but I just threw in what can be operated. He who seeks may find! And I learn from my mistakes, like anyone else who wants to know! ( ;)))=
 

Can you tell me why the compiler gives the warning "expression has no effect" in the line for

i = 0; 
for (i;i<=OrdersTotal();i++ )
Why no effect
 
wolfovik:

Tell me, the compiler gives a warning "expression has no effect" in the line for

Why no effect


I think it's because the initial value is assigned outside the block.

Reason: