OrderModify error 1 during back testing - page 3

 
angevoyageur:
Yes I know your recommendation, that makes sense. But if people knows and understands the limitations, it can be used.
About your point 4, do you check it effectively ? Just curious.
  1. The problem is they use with without knowing, and just because it can be used doesns't mean it should.
  2. Never measured it, but the implementation must be equivalent to:
    double NormalizeDouble(double v, int d){
       double p = MathPow(10, -d);
       return( p * MathFloor(v / p) );
    }
    Even optimizing the function calls away you still have d+1 fp multiplies, fp divide, fp2int, and int2fp per call, or 2d+8 fp operations plus the "==" comparison.
    Verses:
     v1 - v2 > -Point/2
    One time divide and a fp subtraction and the ">" comparison. 18+1 vs 1+1
Reason: