strategy refinement of the advisor - page 2

 
IRIP:


We're talking about intraday trading... You want to get away from the hustle and bustle, to the days, to stocks, to family, after all.

Don't you?


And you can't sleep at night with your diaries.
 
if (Low[0]>Low[1]&&Low[1]<Low[2]&&High[0]>High[1]&&High[1]<High[2]) BuyOp=true;

if (High[0]<High[1]&&Low[0]<Low[1]&&High[1]>High[2]&&Open[0]<Close[1]) SellOp=true;

Please tell me, what can be the error? Why is it not opening a position?

 
IRIP:
if (Low[0]>Low[1]&&Low[1]<Low[2]&&High[0]>High[1]&&High[1]<High[2]) BuyOp=true;

if (High[0]<High[1]&&Low[0]<Low[1]&&High[1]>High[2]&&Open[0]<Close[1]) SellOp=true;

Please tell me, what can be the error? Why does not it open a position?


There is no error in this, unless there is a logical one, but who can guess... Keep looking.

I recommend separating separate logical blocks with brackets:

if ( (High[0]<High[1]) && (Low[0]<Low[1]) && (High[1]>High[2]) && (Open[0]<Close[1]) ) SellOp=true; 
 
Thank you, BIGGER!
 
if ( ( (Low[0]>Low[1]) && (Low[1]<Low[2]) && (Low[1]<Low[2]) && (High[1]<High[2]) ) BuyOp=true;

if ( ( (High[0]<High[1]) && (Low[0]<Low[1]) && (High[1]>High[2]) && (Open[0]<Close[1]) ) SellOp=true;
 

At this rate

if ( ( (Low[0]>Low[1]) && (Low[1]<Low[2]) && (Low[1]<Low[2]) && (High[1]<High[2]) ) BuyOp=true;

position opened at 18-15 on usd/jpy although at 18-05 and 18-00 Low was equal

2013.05.27 17:55 101.08 101.09 101.07 101.07

2013.05.27 18:00 101.06 101.06 101.05 101.05

2013.05.27 18:05 101.06 101.07 101.05 101.06

2013.05.27 18:10 101.07 101.07 101.06 101.07

2013.05.27 18:15 101.08 101.09 101.07 101.08

2013.05.27 18:20 101.09 101.10 101.08 101.10

 

As far as I understand, the rule for BUY is not respected

(High[1]<High[2])

How do I fight it?

 
IRIP:

At this rate

if ( ( (Low[0]>Low[1]) && (Low[1]<Low[2]) && (Low[1]<Low[2]) && (High[1]<High[2]) ) BuyOp=true;

position opened at 18-15 on usd/jpy although at 18-05 and 18-00 Low was equal

2013.05.27 17:55 101.08 101.09 101.07 101.07

2013.05.27 18:00 101.06 101.06 101.05 101.05

2013.05.27 18:05 101.06 101.07 101.05 101.06

2013.05.27 18:10 101.07 101.07 101.06 101.07

2013.05.27 18:15 101.08 101.09 101.07 101.08

2013.05.27 18:20 101.09 101.10 101.08 101.10


Guessing is tiring. Let's code.
 
here it is
Files:
hilo.mq4  5 kb
 

The point is to

To catch turns like this