EA Forex Academy – Algorithmic & Manual Trading Courses › Forums › Forex Trading Forum › Calculating Spreads costs
October 1, 2020 at 16:49 #61959
Well guys i need to ask about spreads calculation as part of the transaction cost, is it more important that the spread will be low at the position entry or at the exit point, or during the whole period of holding the position?
I am asking this bcz i have generated many gd strategies that works better during the rollover hour where spreads widen too much? And these strategies have proved a remarkable stitistical edge over a long period and under high modelling quality backtesting and forward testing and on multimarket assets.
Second what is your opinion of working with fixed spread accounts knowing that all brokers offering fixed spreads are market makers? And do you know any gd one?
Any reply is appreciated
RegardsOctober 7, 2020 at 19:17 #62331
Any reply??October 9, 2020 at 10:39 #62697
Spread fluctuations during a trade, especially around midnight and in weekends, occupy my mind too.
Is there a way to avoid them, other than using a pessimistic round up with factor 10 of a spread value in pips?
Referring to Petko’s REPLY #37268 in this forum, he says:
“You are using complete Historical data, so the EAs that are robust should go over the weekend without issues.”
So maybe we shouldn’t get too much into details and look at the big picture in stead?
According to what I’ve learned from Ilan Vardy (Forex Trading for Beginners Course + 40 robots monthly), it doesn’t make to much difference whether we choose a commission-based broker with zero (or low) spreads or a spread-based broker with zero commissions, the outcome is roughly the same.
Looking forward to a reply as well.
Kifak Charbel 😉October 9, 2020 at 11:54 #62777
I get your concern, but there is no 100% answer to that.
Usually, the brokers widen the spread when there is volatility on the market but that usually is the best time to enter into the trade and take quick profits.
Answering the very first question – it matters when you open the position. For example, if you want to buy, you will be buying at the Ask price and you will see a negative start for the trade – the spread. When the trade closes it will close on the BID price at that moment.
Or in other words, it matters at the opening and in the closing.
But you pay the spread one time. And actually, it is not actual “Pay the spread” there is no such a thing. It is just opening the long trade at the Ask price and closing it at the Bid price. The same thing applies conversely to the short trades.October 9, 2020 at 17:20 #62843
Thank you Asser Kifak & Petco, appreciate ur replies, well guys i know the spread matters during the whole process especially if the SL is tight, anyway in included in the meta editor script manually a spread filter…October 9, 2020 at 19:23 #62844
So you can do programming. Great!
Hope it works for you.
“Kifak” was a greeting which I thought you’d understand by putting 2 and 2 together 😎October 10, 2020 at 8:24 #62853
I had similar concerns when I first started using EAS. I “borrowed” some code from the other forum and played around with it till it did what I thought it should do. It prevents the EA from entering / exiting if the spread is above a preset level. If you are not in a position and price spikes you will not be entered into the position until spread drops below your preset level and if you are in a position you won’t get taken out with a spike.
I am not a coder so you will have to verify that it is working correctly in saying that I carried out many side by side tests and I believe it is working correctly.
I found that initially the spread protection does make the EAs more profitable but after a while it averages out to a similar level as the EA without spread protection. I have not used it for a while but will start to again as I am looking at running Live accounts for shorter periods of time and it may be beneficial.
This code is for the portfolio EAs and will probably be slightly different for the std EAs.
Settings are in points so I normally use 30 for 3 pips.
So, open up the Portfolio EA with meta editor.
and copy in this line as shown:
static input int Maximum_Spread = 30; // Maximum Spread (points)
Then these line as shown:
//Add protection maximum spread
See image in next post
Compile and save.
Run some side by side tests and see how you go…..October 10, 2020 at 8:25 #62854October 10, 2020 at 11:01 #62886
Hello guys, tku Richard, this is exactly what i ve inserted to the EA..
@ASSER, Bro i got u mn l awal 3refet enak jare… m nt a coder, but i know few things, anyway this is my email Charbelaboud@hotmail.com..October 11, 2020 at 12:12 #63066
Yes! Thank you for sharing your method of editing the code Richard. Although I’m far from being ready to test it, I’ll bookmark this post for future reference. I’m sure you and Charbel found a good solution.
Petko’s answer was very informative to me as well. Thanks Petko.October 11, 2020 at 15:39 #63132
Cheers, guys. I am aware of this option for the code but as Richard said in the end it is almost the same thing. I tested it long ago and I did not see a huge difference.
If this was a profitable step it would be available in EA Studio by default 🙂October 11, 2020 at 18:10 #63137
Well tku Petko for the valuable infos, first i thought this way, i mean mayb this spread filter will forbid the EA from executing many profitable trades and thus overall will make almost the same results, this is why i ve run 2 copies of the EA with spread filter and without to check their results a couple of weeks… Anyway thank you all guys..October 12, 2020 at 0:49 #63142
Could you post your results please Charbel….. Interested to see if they are similar to mine….October 12, 2020 at 2:12 #63144
Hello Richy, Absolutely bro ill, but dunno how much we can count on such tests bcz the EAs im testing work mainly kn the rollover hours where slippage occurs the most.. Despite m using a slippage monitor but it does nt make any sense bcz the slippage is only remarkable in real accounts..Overall im convinced in petko opinion.. Anyway ill keep u updated bro.. CheersOctober 14, 2020 at 9:37 #63291
Great work, guys! I have done it all so far with tests, tests, tests. The more you do it, the more you realize that there is something more to test, something more to compare.
I am happy that already in the Forum there are people that are sharing their skills and ideas, results, tests. That makes it even easier for me… 🙂
- You must be logged in to reply to this topic.