Quote:
Originally Posted by ElectricSavant
ahhh..
I think I know what kayvan was earlier posting about...
The candlesticks are formed with the ask line....
The kayvan rule is...to buy 3 pips above the high of the candle and sell 3 pips below the low of the candle....VISUALLY
But..
We buy on the ask and sell on the bid...and the high and the low of the candles are formed with the bid on MT4..
wolfe can you go through your entire code and make sure that
bid is for the sells
and....
ask is for the buys
then we can adjust the buy lag and the sell lag when we know for sure you got all the ducks in a row!
He is gonna' beat me...I just know it!
ES
|
I'm still here for just a little while longer.
The rules in coding an OrderSend() command:
At opening of a market order (OP_SELL or OP_BUY), only the latest prices of Bid (for selling) or Ask (for buying) can be used as open price.
All the long OrderSend() commands contain the Ask:
PHP Code:
Ticket=OrderSend(Symbol(),OP_BUY,Lot_Size,Ask,Slippage,NULL,NULL,"TFX_LONG_ADDITIONAL",Magic_Number,0,Green);
All the short OrderSend() commands contain the Bid:
PHP Code:
Ticket=OrderSend(Symbol(),OP_SELL,Lot_Size,Bid,Slippage,NULL,NULL,"TFX_SHORT_ADDITIONAL",Magic_Number,0,Red);
When using your entry lag take into account your spread.
I'll think about this tomorrow, and see if any other good answer arises.
