It MAY simply be that I have Ask instead of bid in this piece of code:
PHP Code:
((Pyramid==true)&&(Use_MA_Entry==false)&&(Ask >= Next_Buy)&&(Ask>Last_Buy)&&(Last_Type==OP_SELL)&&(Last_Entry_Filter==true))
That's probably it. The Ask I think met the criteria of the high of the last 2 bars. Go into your chart options (F8) and select Show Ask Line, and have a look. I think the difference between the bid and the ask is the problem here.