Quote:
|
Originally Posted by abrs70
can i run on 3 spread broker? can i run on micro?
|
These settings are the way I am running right now on fxdd...
also I have changed this part of the code from 0.0002 ...
PHP Code:
if(Ask-Bid>0.0002)
{
ObjectDelete("spread");
ObjectCreate("spread", OBJ_TEXT, 0, Time[110], Low[0]+(10*Point));
ObjectSetText("spread","Spread Blocked "+DoubleToStr(Ask-Bid,4),18,"Arial",White);
return(0);
}
if(Ask-Bid<=0.0002)
{
ObjectDelete("spread");
ObjectCreate("spread", OBJ_TEXT, 0, Time[110], Low[0]+(10*Point));
ObjectSetText("spread","Spread Allows "+DoubleToStr(Ask-Bid,4),18,"Arial",White);
}
to an external variable you can set as you wish for the spread blocking.
PHP Code:
if(Ask-Bid>MaxSpread)
{
ObjectDelete("spread");
ObjectCreate("spread", OBJ_TEXT, 0, Time[110], Low[0]+(10*Point));
ObjectSetText("spread","Spread Blocked "+DoubleToStr(Ask-Bid,4),18,"Arial",White);
return(0);
}
if(Ask-Bid<=MaxSpread)
{
ObjectDelete("spread");
ObjectCreate("spread", OBJ_TEXT, 0, Time[110], Low[0]+(10*Point));
ObjectSetText("spread","Spread Allows "+DoubleToStr(Ask-Bid,4),18,"Arial",White);
}
I have seen when I was running with it set at 0.0002 and the spread was 0.0002 that it blocked it. or at least it left the Blocked message on the chart. I'm not sure which. it won't change the display on the chart until a subsequent tick which is within the range changes the message. But I am running my setting at 0.0003 to allow one pip variance on a two pip spread. That way I'm sure not to block a two pip situation.
I have no explaination for why it blocked at 0.0002 sometimes. The code should allow it if it equals the max spread specified. You can see for yourself that I put <= in the condition and if that condition is true then allow it.
perhaps the spread is varying larger than the max spread specified by a factor of 0.00001 or something and blocking because it's so slightly larger not a full pip??? I don't really know. I'm just going to allow one extra pip for wiggle room and not worry about it at this point.
I have made this change so you can set it for whatever you want including how ever many decimals you want to specify 0.00001 or whatever.
did I just do what I think I did? oy...sorry wrong thread...