PHP Code:
SetOrder(OP_BUY,Lots,Bid,slippage,sl,tp,Blue);
SetOrder(OP_SELL,Lots,Ask,slippage,sl,tp,Red);
If you can find a MT4 broker who lets you buy at bid and sell at ask, you can become a billionaire. It is a garbage EA that takes advantage of a bug in MT3 demo only.