**d_bignotti:**i get 0.6900000000000001. Why this is happening?

- 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 forum
- Do NOT use
*NormalizeDouble*, EVER. For ANY Reason. It's a kludge, don't use it. It's use is always wrong- 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 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 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 forum or Bid/Ask: (No Need) to use NormalizeDouble in OrderSend - MQL4 forum
- Lot size must also be adjusted to a multiple of
*LotStep*. If that is not a power of 1/10 then*NormalizeDouble*is wrong. Do it right.

- SL/TP (stops) need to be normalized to tick size (not
- You place the stop where it needs to be - where the reason for the trade is
no longer valid. E.g. trading a support bounce the stop goes below the
support.
- Account Balance * percent/100 = RISK = OrderLots * (|OrderOpenPrice - OrderStopLoss| * DeltaPerLot + CommissionPerLot) (Note OOP-OSL includes the SPREAD, and DeltaPerLot is usually around $10/pip)
- Do NOT use TickValue by itself - DeltaPerLot
- You must normalize lots properly and check against min and max.
- You must also check FreeMargin to avoid stop out

I'm running this script to test a function in my EA that auto calculate lot based on % and a Delta, i wrote the revelant code only with numeric value, it's the first time i get this kind of problem running it for several week.

If you run the Script i'm getting a Lots that is 0.6896662958841845,

when i'm rounding it with Lot step of my broker (0.01) i get 69.0 that is right.

But when then, i'm multiplying it for lot step (again 0.01) i get 0.6900000000000001. Why this is happening?

Tried also using NormalizeDouble and i get wrong value, what should i do? The correct lot should be 0.69!