Trying to get 4/5 digit read out

 

Hello everyone,

Code below.

   CurrentSymbol     = SymbolName       (Next_Symbol,TRUE);
   CurrentSymbolLow  = iLow             (CurrentSymbol,TIMEFRAME,0);
   CurrentSymbolHigh = iHigh            (CurrentSymbol,TIMEFRAME,0);
   Spread            = MarketInfo       (CurrentSymbol,MODE_SPREAD);
   CurrBid           = SymbolInfoDouble (CurrentSymbol,SYMBOL_BID);     //
   CurrAsk           = SymbolInfoDouble (CurrentSymbol,SYMBOL_ASK); 


SYMBOL_BID / SYMBOL_ASK not always 4-5 digits. I need some help please.

//----------------------------------------------------------------------------------------------
   CurrentADXA       = iADX (CurrentSymbol,TIMEFRAME,14,PRICE_CLOSE,MODE_MAIN,1);
   CurrentADX        = iADX (CurrentSymbol,TIMEFRAME,14,PRICE_CLOSE,MODE_MAIN,0);
//----------------------------------------------------------------------------------------------   
   READplusA         = iADX (CurrentSymbol,TIMEFRAME,14,PRICE_CLOSE,MODE_PLUSDI,1);
   READplus          = iADX (CurrentSymbol,TIMEFRAME,14,PRICE_CLOSE,MODE_PLUSDI,0);
//----------------------------------------------------------------------------------------------
   READminusA        = iADX (CurrentSymbol,TIMEFRAME,14,PRICE_CLOSE,MODE_MINUSDI,1);
   READminus         = iADX (CurrentSymbol,TIMEFRAME,14,PRICE_CLOSE,MODE_MINUSDI,0);
//----------------------------------------------------------------------------------------------

Second part is this code, still not at 4-5 digits. I was going to normalize as double, but I would like to ask you all about the best options availiable in MQL4

 
GrumpyDuckMan:

SYMBOL_BID / SYMBOL_ASK not always 4-5 digits. I need some help please.

Second part is this code, still not at 4-5 digits. I was going to normalize as double, but I would like to ask you all about the best options availiable in MQL4

  1. Bid or any other price read from the broker is already normalized.

  2. Floating point has infinite number of decimals, it's your not understanding floating point and that some numbers can't be represented exactly. (like 1/10.)
              Double-precision floating-point format - Wikipedia, the free encyclopedia See also The == operand. - MQL4 and MetaTrader 4 - MQL4 programming forum

  3. If you want to see the correct number of digits, convert it to a string.
               question about decima of marketinfo() - MQL4 and MetaTrader 4 - MQL4 programming forum

  4. Do NOT use NormalizeDouble, EVER. For ANY Reason. It's a kludge, don't use it. It's use is always wrong

 
whroeder1:
  1. Bid or any other price read from the broker is already normalized.

  2. Floating point has infinite number of decimals, it's your not understanding floating point and that some numbers can't be represented exactly. (like 1/10.)
              Double-precision floating-point format - Wikipedia, the free encyclopedia See also The == operand. - MQL4 and MetaTrader 4 - MQL4 programming forum

  3. If you want to see the correct number of digits, convert it to a string.
               question about decima of marketinfo() - MQL4 and MetaTrader 4 - MQL4 programming forum

  4. Do NOT use NormalizeDouble, EVER. For ANY Reason. It's a kludge, don't use it. It's use is always wrong

Hello whoeder1,

Thank you,

After reading your reply I searched around my previous posts and found the answer.

 
IndicatorDigits(5)

?

Reason: