I am simply trying to check the current price ask or bid to see if i can place an order based on the range varible HighPrice (high of previous bar already defined and calculated in the body of the start program ) and LowPrice (low of the previuos bar defined and calculatd in the start part of the program)
this function tests if the price has moved too quickly for a pending order ie
Is the ask or bid within 100 pips of high and low of previous bar if so place market order (function called marketorders()) if it is beyond the 100 pip range then market is too fast and set signal variable SiganlSH and SignalLG to false and return to main program
It is important that the signal is stored and able to be referenced by the start program
hope you can help
{
double HighPrice , LowPrice;
RefreshRates();
if Ask >= HighPrice || Bid<= LowPrice // Price moving beyond pending order high & low
{
if Ask <= (HighPrice + (100*Point))|| Bid >= (LowPrice - (100*Point))
marketorder(); //Trade at market as price not moved more than 100 pips beyond range of high & low
}
if Ask > (HighPrice + (100*Point)) || Bid < (LowPrice - (100*Point))
{
Print ("Market moving too fast");
SignalLG=false;SignalSH=false;
}
Return (0);
}
this function tests if the price has moved too quickly for a pending order ie
Is the ask or bid within 100 pips of high and low of previous bar if so place market order (function called marketorders()) if it is beyond the 100 pip range then market is too fast and set signal variable SiganlSH and SignalLG to false and return to main program
It is important that the signal is stored and able to be referenced by the start program
hope you can help
{
double HighPrice , LowPrice;
RefreshRates();
if Ask >= HighPrice || Bid<= LowPrice // Price moving beyond pending order high & low
{
if Ask <= (HighPrice + (100*Point))|| Bid >= (LowPrice - (100*Point))
marketorder(); //Trade at market as price not moved more than 100 pips beyond range of high & low
}
if Ask > (HighPrice + (100*Point)) || Bid < (LowPrice - (100*Point))
{
Print ("Market moving too fast");
SignalLG=false;SignalSH=false;
}
Return (0);
}