Thread: MT3 Questions
View Single Post
  #1 (permalink)  
Old 02-01-2006, 03:08 PM
Nicholishen's Avatar
Nicholishen Nicholishen is offline
Senior Member
 
Join Date: Dec 2005
Posts: 531
Nicholishen is on a distinguished road
MT3 Questions

I recently realized that broker (particularly interbank fx) spreads can diverge more than 10 pips. I am scalping using MT3, and I attempted to code an algorithm to stay out of the market in such times. As the code is fairly simple, i seem to have problems with the following:

Code:
define: spread(2);

tt= spread * Point;
spr =ask - bid;

if spr != tt then 
	{
	sd++;
	 
	Print ("SPREAD DIFF ", spr);
	FileWrite(h1,bid,ask,spread,TimeToStr(CurTime),sd);
	}
	
Comment("BID (",bid,")    Ask (",ask,")   Spread (",spr,")");
When the result of spr is .0002 and tt = .0002 the expression for some reason still results as true. Any ideas to why?

Last edited by Nicholishen; 02-01-2006 at 03:13 PM.
Reply With Quote