Chart attached.
Any reason why my EA is making buy orders way above the candle high? Doesn't seem to do this with sell orders in the opposite direction.
It doesnt do this in all cases, just some of the time.
It is called "Spread". The chart only shows the candles OHLC values based on Bid prices, but BUY orders open at the Ask price (Ask = Bid + Spread).
The rules are as follows:
- BUY order opens at Ask, but closes at Bid
- SELL order opens at Bid, but close at Ask
It is called "Spread". The chart only shows the candles OHLC values based on Bid prices, but BUY orders open at the Ask price (Ask = Bid + Spread).
The rules are as follows:
- BUY order opens at Ask, but closes at Bid
- SELL order opens at Bid, but close at Ask
Hi Fernando, thanks for the response.
It seems the first two hours of a new day are very volatile. My proposed solution is to limit the EA to delay trading until the first two hours of a new day have passed. Would that be an ideal fix? or is there a better solution?
Hi Fernando, thanks for the response.
It seems the first two hours of a new day are very volatile. My proposed solution is to limit the EA to delay trading until the first two hours of a new day have passed. Would that be an ideal fix? or is there a better solution?
No, not ideal solution! Just because it is volatile or not does not always have direct correlation with Spread. What you should do, is make your EA monitor the spread and have it trade only when the spread is below a certain value defined by you. In other-words, for example define a "MaxSpread" input for your EA, and only trade when the current spread, or even the current average spread of several bars is below that "MaxSpread" value.
Awesome, Ill look into that. Thanks Fernando!

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Chart attached.
Any reason why my EA is making buy orders way above the candle high? Doesn't seem to do this with sell orders in the opposite direction.
It doesnt do this in all cases, just some of the time.