strategy refinement of the advisor - page 3

 
IRIP:

The point is to

To catch these kinds of U-turns


What's wrong with fractals in that case?

they show exactly these kinds of reversals...

 
Wave analysis? No, I don't =)
 

The point is to get the thing to handle conditions correctly.

Otherwise it trades but, not according to the rules

 

Where is the wave analysis here? Checking compliance with one or two bars from the current one is far from wave analysis.

Write in words the algorithm according to which rules your TS should work...

 

If H0 < H1 a H1 > H2 and Open0 < Close1 and Open1 > Close2

then Sell

If L0 > L1 a L1 < L2 and Open0 = or > Close1 a Open1 = or < Close2

then Byu

 
a simple, effective scheme, no frills
 
What are the errors in the tester logs?
 
IRIP:

If H0 < H1 a H1 > H2 and Open0 < Close1 and Open1 > Close2

then Sell

If L0 > L1 a L1 < L2 and Open0 = or > Close1 a Open1 = or < Close2

then Byu

Everything is correct here except using High[0] and Low[0]. These values change dynamically on every tick; at some moment, your inequalities can work, though at the moment of the current bar closing, the condition will not be fulfilled anymore.

Remedy: Replace with:

if( Low[3]>Low[2]     && Low[2]<Low[1]
 && Close[3]>=Open[2} && Close[2]]<=Open[1] ){
   Покупаем на открытии бара
}
if( High[3]<High[2]   && High[2]> High[1]
 && Close[3]<=Open[2} && Close[2]]>=Open[1] ){
   Продаем на открытии бара
}
 
tara:

... although the condition will no longer be met at the close of the current bar....

Remedy: Replace with:


A very important point indeed. Thank you.
 

Where can I read about how to set a stop loss?

I need, say, a stop at Low bar 2