salirazataqvi:
Actually it's the same value. Scientific notation on one side, and rounded to 6th decimal other side.
Hi all,
I am using MACD indicator in MQL4. The issue I am facing is macd showing different value on mouseover but in code it is giving different value. Please refer to the blow snapshot for value of histogram and highlighted value printed via code.
4.8766603758299e-05
Hi,
4.87e-05 is equal to 0.000049 but it's too big to be displayed correctly.
use NormalizeDouble with the number of digits that you want to display.
- salirazataqvi: I am using MACD indicator in MQL4.Why did you post your MT4 question in the Root / MT5 EA section instead of the MQL4 section, (bottom of the Root page?)
General rules and best pratices of the Forum. - General - MQL5 programming forum
Next time post in the correct place. The moderators will likely move this thread there soon. - Mounir Cheikh: use NormalizeDouble with the number of digits that you want to display.Do NOT use NormalizeDouble, EVER. For ANY Reason. It's a kludge, don't use it. It's use is always wrong
- Print out your values to the precision you want with DoubleToString - Conversion Functions - MQL4 Reference.
- SL/TP (stops) need to be normalized to tick size (not Point.) (On 5Digit Broker Stops are only allowed to be placed on full pip values. How to find out in mql? - MQL4 and MetaTrader 4 - MQL4 programming forum) and abide by the limits Requirements and Limitations in Making Trades - Appendixes - MQL4 Tutorial and that requires understanding floating point equality Can price != price ? - MQL4 and MetaTrader 4 - MQL4 programming forum
- Open price for pending orders need to be adjusted. On Currencies, Point == TickSize, so you will get the same answer, but it won't work on Metals. So do it right: Trailing Bar Entry EA - MQL4 and MetaTrader 4 - MQL4 programming forum or Bid/Ask: (No Need) to use NormalizeDouble in OrderSend - MQL4 and MetaTrader 4 - MQL4 programming forum
- Lot size must also be adjusted to a multiple of LotStep and check against min and max. If that is not a power of 1/10 then NormalizeDouble is wrong. Do it right.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi all,
I am using MACD indicator in MQL4. The issue I am facing is macd showing different value on mouseover but in code it is giving different value. Please refer to the blow snapshot for value of histogram and highlighted value printed via code.
4.8766603758299e-05