molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming
http://www.molanis.com/forum/

Prevent trading during high spread
http://www.molanis.com/forum/viewtopic.php?f=6&t=6100
Page 1 of 1

Author:  trueresource [ Wed Dec 03, 2014 6:07 pm ]
Post subject:  Prevent trading during high spread

Does any one know how to prevent trading during high spreads. I read a few things that indicate that the code must differentiate between 4 and 5 decimal currencies. But I haven't seen any specific code that I can drop into MQL icon to perform such. I would so much appreciate your help. Im looking for something generic so that I can use the "SYMBOL" parameter rather the having to input the specific currency. Or if you know someone who can code for cash to do this this will work also.

Author:  admin [ Wed Dec 03, 2014 9:42 pm ]
Post subject:  Re: Prevent trading during high spread

Try this condition:
bid-ask > your limit

Author:  trueresource [ Mon Dec 22, 2014 12:45 pm ]
Post subject:  Re: Prevent trading during high spread

Hi Thanks for replying to my question.

Did you mean to say "Bid-Ask<3.5" using the "Less than rather than greater than symbol. Im not a coder. But it looks like your code says to execute if the spread is greater than a certain value. Please explain.

Author:  molanisfx [ Sat Dec 27, 2014 11:23 pm ]
Post subject:  Re: Prevent trading during high spread

If you join your spread condition with trading conditions using ANDs you should use
(Bid - Ask < amount) AND (...)
amount is a value not pips
See http://www.dailyfx.com/forex/education/ ... aders.html

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/