fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    Hi admin. I need help with 0.1000000000000 and 1e-005 what is IT?

    Questions & Answers
    3
    11
    2184
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      chiper last edited by

      One month ago i compile my project and all be fine.(My old project safe and work good)

      In that month i compile project push to** .EX4 **and give that

      What is it ????
      I Try found problems but not success.
      I try myself compile .mq4 but problems same...

      Pls help me ... What i must do?

      1 Reply Last reply Reply Quote 0
      • C
        chiper last edited by

        I compile code in MetaEditor and found warnings.

        In code I have variable:
        static double Group_Work;

        After i found that:

        static string OrdersGroup; OrdersGroup = v::Group_Work;

        i undestand only DOUBLE = STRING .... but its wrong!

        may be that problem?

        1 Reply Last reply Reply Quote 0
        • C
          chiper last edited by

          i make simple project and project have PROBLEM

          https://fxdreema.com/shared/v0Vnmv4Gc

          pls help me.

          1 Reply Last reply Reply Quote 0
          • C
            chiper last edited by

            I found one Problem.
            https://fxdreema.com/shared/wcoMyOeld

            If i run test same time work ok

            but same time i see that

            Its WRONG

            ASK ALWAYS must be = or < 5 DIGITS

            1 Reply Last reply Reply Quote 0
            • C
              chiper last edited by

              i compile Simple code:

              #property copyright "Copyright 2015, MetaQuotes Software Corp."
              #property link "https://www.mql5.com"
              #property version "1.00"
              #property strict

              //+------------------------------------------------------------------+
              //| Expert initialization function |
              //+------------------------------------------------------------------+
              int OnInit()
              {
              //---
              return(INIT_SUCCEEDED);
              }
              //+------------------------------------------------------------------+
              //| Expert deinitialization function |
              //+------------------------------------------------------------------+
              void OnDeinit(const int reason)
              {
              //---

              }
              //+------------------------------------------------------------------+
              //| Expert tick function |
              //+------------------------------------------------------------------+
              void OnTick()
              {
              //---
              **Print (MarketInfo(Symbol(),MODE_ASK)); **
              }
              //+------------------------------------------------------------------+

              1 Reply Last reply Reply Quote 0
              • fxDreema
                fxDreema last edited by

                This is a long story...

                Somewhere on the top of the code there is #property strict. How it will work without it?

                1 Reply Last reply Reply Quote 0
                • C
                  chiper last edited by

                  Sanks for help youre help always work. And pls never close youre project its best visual project what i found.

                  i delete ** #property strict** Main problem is gone
                  Hmmm ...
                  I have 5 digits account.
                  If i choose usdjpy i have price = 120.123 print = 120.123 OK
                  if i choose nzdusd with 5 digits after dot 0.56789 <> print only 4 digits after dot = 0.5678 Not OK but main problem is gone

                  Why Print only 4 digits if i have 5 digits?

                  1 Reply Last reply Reply Quote 0
                  • fxDreema
                    fxDreema last edited by

                    I removed strict mode for a while, but I just put it back because other problem appeared. I guess I just need to fix those numbers with NormalizeDouble here and there. The strict mode basically shows us the real value, but this value is kinda wrong if it's not normalized. Weird floating numbers 🙂

                    1 Reply Last reply Reply Quote 0
                    • C
                      chiper last edited by

                      You something fix and my program work very well... SANKS Friend 🙂 my program works as before 🙂

                      happy new year, happiness, health and just just just.

                      1 Reply Last reply Reply Quote 0
                      • P
                        Processman last edited by

                        Yeah , NormalizeDouble rocks , i think , who need more than 5 digits ? ... Compare another value , print in chart , etc ?
                        Weird numbers mess everything ? ... Now as long as I'm joking ? ... Sorry for this , a couple of beers consumed 🙂

                        1 Reply Last reply Reply Quote 0
                        • fxDreema
                          fxDreema last edited by

                          Unfortunately I found the following problem. First, let's say I use strict mode and #property strict. It is supposed that by doing this, we allow MetaEditor and MetaTrader itself to tell us if our code is bad, that's fine. But try this EA with enabled strict mode (somewhere on the top, remove the // before #property strict) and this is the result:

                          https://fxdreema.com/shared/wY4sLJf2d
                          http://prntscr.com/9lf1sh
                          http://i.imgur.com/LrC3Sue.png

                          What this EA does is to create a trade so Equity of the account can change over time and then I just print it's value with using NormalizeDouble.

                          Print(NormalizeDouble(AccountEquity(), 5));
                          

                          So, even if I use NormalizeDouble, the value appears as not normalized at all. %(#8040FF)[AccountEquity()] returns "double" value: http://docs.mql4.com/account/accountequity. **NormalizeDouble **is supposed to work over "double" value, but this is the result 🙂

                          1 Reply Last reply Reply Quote 0
                          • 1 / 1
                          • First post
                            Last post

                          Online Users

                          K
                          A
                          D
                          S
                          G

                          13
                          Online

                          146.7k
                          Users

                          22.4k
                          Topics

                          122.6k
                          Posts

                          Powered by NodeBB Forums | Contributors