This is a block of code that I have which supposedly detects and accounts for brokers which use 5 digit prices.
What I don't understand is how it can detect any of the JPY pairs.
Inserted Code
//*************************************************************
//+----------------------------------------------------------------------------------+
//| SetPoint Function |
//| |
//| Get the correct point setting to correct problem from Velocity & others |
//| using 5 place decimals instead of 4 |
//| Will correct for 2 and 4 places to be used when calculating |
//| StopLoss, TakeProfit, etc |
//| |
//+-----------------------------------------------------------------------------------+
double SetPoint(string mySymbol)
{
double mPoint, myDigits;
myDigits = MarketInfo (mySymbol, MODE_DIGITS) ;
if (myDigits < 4)
mPoint = 0.01;
else
mPoint = 0.0001;
return(mPoint) ;
}
//Add the following call in the init function.
//myPoint = SetPoint(Symbol( ));
//change all Points to myPoint in your code What I don't understand is how it can detect any of the JPY pairs.