renexxxx wrote:For long
Code: Select all
if (iClose(NULL,0,2) >= DailyPivot && iClose(NULL,0,1) <= DailyPivot + (PivotBufferPips*Point)) return;
This does not necessarily guarantee a cross of the Daily Pivot. It merely states that two candle's ago, the Close was above the Daily Pivot and 1 candle ago the the Close was lower than 10 PIPs (default) above the Daily Pivot. So, eg. if Daily Pivot is 1.0320. If iClose(NULL,0,2) == 1.0321 and iClose(NULL,0,1) == 1.0329, this code would return. But no cross has happened.
You are absolutely correct. A very elementary mistake ! Silly Billy !
The next update v.5.07 as follows
For buy
Code: Select all
if (iClose(Symbol(),0,1) >= DailyPivot && iClose(Symbol(),0,0) <= DailyPivot + (PivotBufferPips*Point)) return;
It uses close of CURRENT candle across DP for entry.
To ensure that the ea does not enter trade long after price has crossed the daily pivot, I would suggest using pull back by setting UseStoch to true. I know this is not in accordance with 10.5 for monkeys, but without the pull back, the ea has not got a chance.
As all previous entries were incorrect, I have started a fresh demo with v.5.07.