Download MetaTrader 5

how to increase accuracy of buy order Fractals?

To add comments, please log in or register
aminlv 2016.04.07 23:01 

hi guys,


im trying to write an ea with fractals on sell side it work pretty decent however when i use reverse logic over 50% of time buys turn to fails, i tried in different time setting didnt much help.

i appreciate if any insight or method you can suggest to help me to figure this out


thanks in advance 

Fernando Carreiro
Fernando Carreiro 2016.04.07 23:29  

You must remember that the Fractal Prices (or any other indicator) or Bar chart, is based on the Bid price. However, buy orders open with the Ask price.

So in essence, you would have to compensate the prices of the High Fractals with the spread value. I am assuming that you are using pending orders most likely as this type of order suffers the most with this problem.

When the spread is fixed, this is easy to resolve, because you simply add that amount and thus you know what the Ask price is for that Fractal.

However, when you have variable spread, that is more difficult. Either you use an approximation using an average spread, or use Market orders instead and in your EA code, you constantly monitor the Bid prices against the Fractal prices to detected when the Market Order needs to be opened.

Also, remember that the underlying symbol you are testing against may have a particular long term bias or "drift". For example, if you test against the EUR/USD, then you will have a long term bias which favours the shorts (or sell orders) more than the longs (buy orders). Add to the mix, the problem of the required spread compensation for High fractals and this makes the long orders even less profitable.

Hope that helped!

PS! The same applies when using the High Fractal as a Stop-Loss for the Shorts (sell orders) as these close using the Ask price.

aminlv 2016.04.08 20:07  
thank you FMIC i gonna try to fix the code i will reply how it goes :)
To add comments, please log in or register