fxDreema

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

    Stop ATR

    Questions & Answers
    2
    33
    9788
    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.
    • fxDreema
      fxDreema last edited by

      I tried this, but didn't worked. The problem can be that I don't directly use those indicator handles. But they are integer numbers starting from 10, so I tried to put 10, 11... nothing. And I don't know why, because while I was testing the EA, my MA lines can be visible from the start. Maybe this is only for custom indicators, I don't know.

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

        What a pity ... it seems to be correct code. I believe that if you succeed, will be helping the whole community fxDreema thinking of hiding your indicators and secrets.

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

          __So ... that way it worked! Thanks!

          But look at it this way: https://www.mql5.com/en/docs/runtime/te ... torrelease
          Hide the indicator?

          To prohibit the showing of the indicator on the chart after testing, call the IndicatorRelease() with the handle of the indicator in the handler OnDeinit(). The OnDeinit() function is always called after the completion and before the showing of the testing chart.

          
          //+------------------------------------------------------------------+ 
          //| Expert deinitialization function                                 | 
          //+------------------------------------------------------------------+ 
          void OnDeinit(const int reason) 
            { 
          //--- 
             bool hidden=IndicatorRelease(handle_ind); 
             if(hidden) Print("IndicatorRelease() successfully completed"); 
             else Print("IndicatorRelease() returned false. Error code ",GetLastError()); 
            }
          

          In order to prohibit the showing of the indicator on the chart, after the completion of a single test, use the function IndicatorRelease() in the handler OnDeinit().

          IndicatorRelease() https://www.mql5.com/en/docs/series/indicatorrelease
          OnDeinit() https://www.mql5.com/en/docs/runtime/event_fire#deinit[/quote:8xh62xxu]

          Well ... anyway this is the solution described in MQL5. If I knew more programming I could even help fxDreema community.

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

            Hello fxDreema. All right?

            I stubborn again with the ATR. I want to do otherwise, without showing the indicator.

            I found 3 values of ATR, in this project. Now I need the most amount of 3 results is chosen.
            https://fxdreema.com/shared/MsxrHGxwe

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

              There is no block to do that or any other calculations with multiple values. Here is something that is not very pretty, but it does the job - https://fxdreema.com/shared/XAQKWPure
              First, I put al values into an array and then I used this function to get the maximum value from that array - https://www.mql5.com/en/docs/array/arraymaximum
              The syntax is not very beautiful, but we don't have many freedom with arrays in MQL4/MQL5. I tried this: double array[3] = {Value1, Value2, Value3), but it didn't worked...

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

                Well ... works start. With that I know TR Now to calculate the ATR just need to add this formula:
                Current ATR = [(Before ATR x 13) + Current TR] / 14
                or
                ATR Shif0 = [(ATR Shift1 x 13) + TR Shift0] / 14

                The value 14 is the period I want to know.

                https://fxdreema.com/shared/H1q8G7ySc

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

                  Hello fxDreema.

                  Eae ... how this health?

                  When I return, and look what I did. Almost the same amount of MetaTrader ATR indicator.
                  https://fxdreema.com/shared/AqyTc8lXc

                  Yellow - MT5 Indicator
                  Lime - fxDreema Formulas block

                  Now, is not just the value of the MT5, but already suitable for use.

                  The best and most practical way would hide the MT5 indicators in backtestes, but I could not, I made this way.

                  I also hope to have helped other fellow users fxDreema.

                  See you!

                  Get well!

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

                    Almost healed.

                    Now I don't understand what you want to do 🙂 Before, I was thinking that you want to get the maximum value from... let's say 3 different values. But now I don't see attempts to determine maximum value. The way you translate your language to english does not work very well 😕

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

                      Yes ... the translator does not say exactly what I need, unfortunately.

                      I need but the higher value of 3 results, which is the ATR calculation, but I found the solution that approached this through the blocks.

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

                        Why don't you learn english? 🙂 Things are going to be muuuuuuch easier for you when you learn english. You can see that now when you don't know it, our communication is weird. My native language is also not english and this also adds to the confusion 🙂

                        So, there is no problem anymore? 😕

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

                          __Why don't you learn english? 🙂 Things are going to be muuuuuuch easier for you when you learn english. You can see that now when you don't know it, our communication is weird. My native language is also not english and this also adds to the confusion :)[/quote:1hg4j0mp]

                          True ... It's something interesting to think about. Already a while I think about doing, but at the moment I do not see a real need. It will be a hobby maybe, but it's a good idea. 🙂

                          __So, there is no problem anymore? 😕[/quote:1hg4j0mp]

                          Currently only in the comments, which are with an additional decimal place. ".0"
                          This leverage also 400 instead of 1:400

                          See the picture below
                          Captura de tela de 2016-06-28 12-46-55.png

                          I need Leverage 1: 400
                          And delete the additional decimal places in the ".0"

                          ......
                          Captura de tela de 2016-06-28 12-46-55.png

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

                            __Currently only in the comments, which are with an additional decimal place. ".0"
                            This leverage also 400 instead of 1:400
                            ...
                            I need Leverage 1: 400
                            And delete the additional decimal places in the ".0"[/quote:3kin5a4h]

                            Solved. I noticed in the code that should change the Numeric to Text the Comment block.

                            In line Leverage, sufficed only I add "1" +
                            Look: ```
                            case 5: if (Label5 != "") { textlbl = Label5; text = (string)("1:"+ic_account_AccountLeverage()); } break;

                            Instead of:
                            

                            case 5: if (Label5 != "") { textlbl = Label5; text = (string)(ic_account_AccountLeverage()); } break;

                            
                            Now appears 1:400
                            1 Reply Last reply Reply Quote 0
                            • fxDreema
                              fxDreema last edited by

                              Try this: http://prntscr.com/bn9768

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

                                Ok. It has facilitated for me. Thank you!

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

                                Online Users

                                K
                                A
                                D

                                21
                                Online

                                146.7k
                                Users

                                22.4k
                                Topics

                                122.6k
                                Posts

                                Powered by NodeBB Forums | Contributors