Forums Development Trading made REALLY Simple: Coder's Chat

Viewing 25 posts - 1 through 25 (of 170 total)
  • Author
    Posts
  • #10480
    simplex
    Moderator

      Hi Guys!

      Since @gg53 started to conduct our joint efforts to get a Community EA up and running, there were several calls from him to contributors (me included) to discuss certain topics outside the Trading made REALLY Simple thread until they are mature enough to be proposed ‘officially’ and maybe included in our EA.

      From a coder’s point of view, I would say that it makes sense to have some lounge besides the official meeting room where we can discuss ideas, call for help, propose code, or just chat leisurely. This also serves the purpose to keep ideas together in one place instead of scattering them around in PMs or a bunch of other threads. So it would be great to keep posts here dedicated to the EA we’re starting to develop.

      If anyone wishes to post an EA fork he coded instead of committing a lib or some code to @VlanFx, feel free to post here. The same goes for indicators, that could be considered helpful. Ideas may grow here, may be altered here, or may just be pinned to the wall and forgotten for years … until somebody stumbles upon them and: ‘Wow … this is what I was looking for!’

      This is the official Coders’ Lounge for everyone contributing to Penguin’s Community EA, so relax. Non-coders and project managers welcome!

      My main problem now: I seem to be unable to serve you any coffee. Help yourself, please!

      Best,

      simplex

      Attachments:
      You must be logged in to view attached files.

      A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)

      #10484
      simplex
      Moderator

        @jaguar1637:

        You posted an EA fork here. You said you didn’t know why it does not compile. My compiler gives a clear message (see pic). Did you miss to include a library file in your post?

        BTW: besides the error, there are 38 compiler warnings. Would be good to get rid of the, imo.

        s.

        Attachments:
        You must be logged in to view attached files.

        A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)

        #10492
        smallcat
        Participant

          Great @simplex, this is a good idea, so the main thread will be clean … i will post here for asking or discussing codes or idea …

          #10494
          smallcat
          Participant

            Hi,

            As i read GG`s post #10476  penguintraders.com/forums/topic/trading-made-really-simple/page/7/#post-10476 ,

            We put long trade after a Trough becomes Peak. This below comes to my head :

            1) At a post, GG prefered to use Pending Orders (Stop Orders, or may better with Limit Orders). But if we put order at the time Trough becomes Peak or Peak becomes Trough), does it not mean that we put order at market price (bid or ask price) ?

            2) Does it not mean, that we just look at Trough and Peak, without the Oscillator ? Or does GG mean some thing else?

            Thanks

             

            #10495
            Anti
            Participant

              GG mentioned more than twice that the trough’n’peaks code hasn’t been complished yet. I believe he refers to the combination of prize action (highest high/lowest low for last X candles) and the volume oscillator. As you can see from pictures he posted that GG defined a peak/trough by highest/lowest volume oscillator values (above/below 40/-40). I hestitate how to apply it. Think it would be a better choice to define peaks/bottoms for candles that cross above +40/below -40 as oscillator is quite choppy and can overshoot previous highs/lows. Any suggestions/ideas?

              • This reply was modified 8 years, 7 months ago by Anti.
              #10497
              smallcat
              Participant

                Hi Anti, good idea. But i do not think that GG just take the candle, at the time the Osc cross that level (lets say level 40). I think it is just a “early signal/sign” that the end of swing will happend soon. The entry itself is based on trend (not explained openly yet) and the Peak/Trough or Trough/Peak state change, which are defined by X bars of other rule like the Low of current candle if lower than the highs of X bars (if i understand it correctly). At one of my last code @Truebars thread, i have defined 2 functions “lowest high” and “highest low” which are for this purpose actually. But i am afraid that my understanding of Lowest High / Highest Low is wrong. Thats why i upload an image to clarify this, but i have deleted it, because it is on the wrong place. It should be here, i will upload it here as soon as i am home. I could be wrong though …

                #10498
                smallcat
                Participant

                  And about the Osc, i am not sure if we can use that one by mladen as it is. GG talked about not using the whole volume, but including the Close-Open/High-Low  calculation too … may be they have relationship …  :unsure:

                  #10501
                  smallcat
                  Participant

                    Hi All,

                    Any information about “Highest Low” and “Lowest High” is really appreciate … I know this is a basic question that almost all trader must know … but i am confused . Please advice.

                    Thanks in advance

                    Attachments:
                    You must be logged in to view attached files.
                    #10504
                    simplex
                    Moderator

                      @smallcat

                      • highest low: watch all 5 lows in your interval, choose the highest one (the highest among the lows)
                      • lowest high: watch all 5 highs in your interval, choose the lowest one (the lowest among the highs)

                      This is the common interpretation. I don’t think that G. follows a different one.

                      s.

                      A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)

                      #10530
                      smallcat
                      Participant

                        @smallcat

                        • highest low: watch all 5 lows in your interval, choose the highest one (the highest among the lows)
                        • lowest high: watch all 5 highs in your interval, choose the lowest one (the lowest among the highs)

                        This is the common interpretation. I don’t think that G. follows a different one. s.

                        Thanks bro. :good:

                        #10543
                        gg53
                        Participant

                          @smallcat

                          • highest low: watch all 5 lows in your interval, choose the highest one (the highest among the lows)
                          • lowest high: watch all 5 highs in your interval, choose the lowest one (the lowest among the highs)

                          This is the common interpretation. I don’t think that G. follows a different one. s.

                          Logic follows guidelines as in post ##9553.

                          There is no “5” variable there…

                          Attached pls find how it should look like on EURJPY, H4.

                          For the EA purpose an Histogram is also Ok.

                           

                          The ForexGT_VolumeOsc is an added feature to Pin-point exact bar entry, but for the current version it’s not required since we enter on Peak/Trough area breakout.

                           

                          G.

                          https://www.mql5.com/en/charts/4378801/eurjpy-x-h4-atom8-financial-services

                           

                          Attachments:
                          You must be logged in to view attached files.
                          #10559
                          simplex
                          Moderator

                            Thanks, G.

                            I interpreted smallcat’s interval of 5 bars as an example and followed his pic in my reply.

                            s.

                            A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)

                            #10562
                            simplex
                            Moderator

                              G.:

                              Attached pls find how it should look like on EURJPY, H4.

                              I spotted the time interval and checked with my version. The indicator looks pretty similar, but it’s hard to believe that there are SO many deviations in our price data.

                              I’ll post my indicator in the main thread for you to check.

                              s.

                              Attachments:
                              You must be logged in to view attached files.

                              A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)

                              #10565
                              smallcat
                              Participant

                                Logic follows guidelines as in post ##9553. There is no “5” variable there… Attached pls find how it should look like on EURJPY, H4. For the EA purpose an Histogram is also Ok. The ForexGT_VolumeOsc is an added feature to Pin-point exact bar entry, but for the current version it’s not required since we enter on Peak/Trough area breakout. G. https://www.mql5.com/en/charts/4378801/eurjpy-x-h4-atom8-financial-services

                                Thanks G. The “5” here is just an example variable of X bars, just want to get the PreviousBar HH, HL, LH, LL. Based on :

                                Highest High = Previous Bar HighestHigh.

                                Lowest High = Previous Bar LowestHigh.

                                Highest Low = Previous Bar HighestLow.

                                Lowest Low = Previous Bar LowestLow

                                To get Previous Bar LowestHigh, as example, we need to define in how many bars we need to search, to get the highest among X bars lows. Then we compare it with current bar. Or, i get it wrong?

                                • This reply was modified 8 years, 7 months ago by smallcat. Reason: Removing html format
                                #10579
                                gg53
                                Participant

                                  Logic follows guidelines as in post ##9553. There is no “5” variable there… Attached pls find how it should look like on EURJPY, H4. For the EA purpose an Histogram is also Ok. The ForexGT_VolumeOsc is an added feature to Pin-point exact bar entry, but for the current version it’s not required since we enter on Peak/Trough area breakout. G. https://www.mql5.com/en/charts/4378801/eurjpy-x-h4-atom8-financial-services

                                  Thanks G. The “5” here is just an example variable of X bars, just want to get the PreviousBar HH, HL, LH, LL. Based on :

                                  Highest High = Previous Bar HighestHigh. Lowest High = Previous Bar LowestHigh. Highest Low = Previous Bar HighestLow. Lowest Low = Previous Bar LowestLow

                                  To get Previous Bar LowestHigh, as example, we need to define in how many bars we need to search, to get the highest among X bars lows. Then we compare it with current bar. Or, i get it wrong?

                                  In the “Init” function:

                                  Previous Bar HighestHigh = High[Bars – 1];
                                  Previous Bar LowestHigh = High[Bars – 1];
                                  Previous Bar HighestLow = Low[Bars – 1];
                                  Previous Bar LowestLow = Low[Bars – 1];

                                   

                                  G.

                                  #10580
                                  gg53
                                  Participant

                                    Please read this (by Ron Black, 2010): http://www.traders.com/Documentation/FEEDbk_docs/2010/09/Black.html

                                    …and get access to the full article…

                                    A short-cut to making a working Indicator (“translate” others code into MT4):

                                    http://www.traders.com/Documentation/FEEDbk_docs/2010/09/TradersTips.html

                                    Enjoy.

                                    Once the above MT4 is bug-free and usable, it will be our FINAL Peak&Trough indie and we can move forward with the EA.

                                    EA should have trading filters as per the template and added requests in the proper thread.

                                    The above will complete Stage #1 & ver.1.0.

                                    @VlanFx will be responsible to create that “official” version, based on your indicator.

                                    From that point we’ll move to additional features, such as CS, Trend definition, etc… Each step should improve our current base-line on all 7 Majors, with same params on each, as detailes in the “Trading made REALLY Simple” relevant post.

                                     

                                    EDIT: pls note that the indicator requires an “Up” & “Down” external buffers/indexes, to identify Peaks & Troughs areas and when they interchange.

                                     

                                    G.

                                     

                                    • This reply was modified 8 years, 7 months ago by gg53.
                                    #10582
                                    Lowphat
                                    Participant

                                      if im not mistaken i posted this earlier.

                                      I made a multi time-frame version out of the CMHx but i don’t think it would be applicable to what you guys are doing.

                                      For “ClearMethod.mq4” perhaps you could do

                                       

                                      
                                      bool isUpSwing,isUpSwing2;
                                      double upSwingLine;
                                      double downSwingLine;
                                      
                                      isUpSwing = (iCustom(NULL, 0, "ClearMethod", 0, 1) > 0); // 1 confirms last bar. use 0 for repainting / live signal
                                      isUpSwing2 = (iCustom(NULL, 0, "ClearMethod", 0, 2) > 0);//2 checks last last bar. use 1 for repainting / live signal
                                      
                                      if (isUpSwing && !isUpSwing2)
                                      {
                                      last bar confirmed clear
                                      }
                                      
                                      if ( !isUpSwing && isUpSwing2 )
                                      {
                                      last bar confirmed clear
                                      }
                                      
                                      

                                      cmh is a self contained histo ver

                                      the sd ver projects a line like support resistance.

                                      this would be MT4 examples of  Ron Black’s Mothod
                                      i dont know if this helps but im posting it anyway :P

                                      • This reply was modified 8 years, 7 months ago by Lowphat.
                                      • This reply was modified 8 years, 7 months ago by Lowphat.
                                      Attachments:
                                      You must be logged in to view attached files.

                                      “I believe the very best money is made at the market turns. Everyone says you get killed trying to pick tops and bottoms and you make all
                                      your money by playing the trend in the middle. Well for twelve years I have been missing the meat in the middle but I have made a lot of
                                      money at tops and bottoms.”
                                      – Paul Tudor Jones

                                      #10589
                                      gg53
                                      Participant

                                        if im not mistaken i posted this earlier. *looks at sim* I made a multi time-frame version out of the CMHx but i don’t think it would be applicable to what you guys are doing. cmh is a self contained histo ver

                                        Good job!!

                                        Just verify that the external buffers/indexes are accessible to the EA and logic is Ok.

                                        Also, verify that the results according to our base-line results on all 7 Majors, with same params.

                                         

                                        Make a function, based on that indie,  that returns entry signal to the penguin EA, replacing the current one.

                                        Pls post indie + function code snippet to the main thread for  @VlanFx to integrate into Penguin EA.

                                         

                                        Thanks!

                                         

                                        G.

                                        #10599
                                        Lowphat
                                        Participant

                                          I edited my prev post with how i might call the first indy externally.

                                          I just skim the threads so i have no idea if it conforms exactly to what ya need it to do.

                                          perhaps @simplex or someone can verify it and post how they would call it.

                                          I have a lot of fun with the clear method on demo’s but i use it in a different way :)

                                           

                                          “I believe the very best money is made at the market turns. Everyone says you get killed trying to pick tops and bottoms and you make all
                                          your money by playing the trend in the middle. Well for twelve years I have been missing the meat in the middle but I have made a lot of
                                          money at tops and bottoms.”
                                          – Paul Tudor Jones

                                          #10601
                                          simplex
                                          Moderator

                                            Hah, interesting:

                                            For “ClearMethod.mq4” perhaps you could do

                                            We were working on the same thing. I found it over here, including a good pdf description.


                                            @Lowphat
                                            : I’m currently debugging my CLEAR function, so you might save some work and wait for mine … or … see who’s faster! B-)


                                            @gg53
                                            : is your P&T identical to Clear Method or only similar?

                                            I followed G.’s proposal over here and made mine a triple timeframe indicator – see pic.

                                            I’m not quite satisfied with some missed troughs in uptrend at the moment, so debugging now and posting later.

                                            s.

                                            Addendum: line is trend TF, bars are countertrend TF, arrows are entry zones.

                                            • This reply was modified 8 years, 7 months ago by simplex. Reason: Addendum
                                            Attachments:
                                            You must be logged in to view attached files.

                                            A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)

                                            #10604
                                            simplex
                                            Moderator

                                              My Peak and Trough indicator to test and check. Single TF for the moment, triple TF needs some code cleanup.

                                              The EA will only need one of the functions: getClearState()

                                              Place .mqh in your Include folder and compile.

                                              Once this is approved to be ok I will post in the main thread including some remarks for @vlanfx to ensure for proper integration in the EA.

                                              s.

                                              Edit: deleted source files and added zip instead – seems to be better because the forum software tends to rename files. Thanks @Bartleby for pointing this out!

                                              • This reply was modified 8 years, 7 months ago by simplex. Reason: sourcefiles zipped
                                              Attachments:
                                              You must be logged in to view attached files.

                                              A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)

                                              #10607
                                              Bartleby
                                              Participant

                                                it didn´t compile , because of a mistyping (one _ too much) of the mqh file

                                                I changed it, if you don´t mind simplex ;)

                                                 

                                                Attachments:
                                                You must be logged in to view attached files.

                                                "A dream you dream alone is only a dream. A dream you dream together is a reality." (John Lennon)

                                                #10609
                                                gg53
                                                Participant

                                                  My Peak and Trough indicator to test and check. Single TF for the moment, triple TF needs some code cleanup. The EA will only need one of the functions: getClearState() Place .mqh in your Include folder and compile. Once this is approved to be ok I will post in the main thread including some remarks for @vlanfx to ensure for proper integration in the EA. s.

                                                  I can understand the “excitement” coming with this Peak&Trough, but please stay focused.

                                                  We want the Peak&Trough to be a callable FUNCTION within the EA.

                                                  We currently want only one TF – which is H4.

                                                  We want the function to use iCustom calls to a viewable indicator, for easy debugging.

                                                  MQH, MTF’s, Trend, etc etc…. will come later, after this stage is finished.

                                                  Also, need to finish implementing, in this stage, FFCAL news filtering, Max Spread, Monday trading, Friday close, etc.

                                                   

                                                  Smaller and definite solid steps will get us quicker to the target.

                                                   

                                                  G.

                                                  #10610
                                                  simplex
                                                  Moderator

                                                    Dear G.!

                                                    I can understand the “excitement” coming with this Peak&Trough, but please stay focused.

                                                    I’m not excited, and I’m focused, as far as possible. For a focused work, clarity about demand and priorities is a basic requirement.

                                                    We want the Peak&Trough to be a callable FUNCTION within the EA.

                                                    Accomplished.

                                                    We currently want only one TF – which is H4.

                                                    Accomplished. Any TF goes for my function.

                                                    We want the function to use iCustom calls to a viewable indicator, for easy debugging.

                                                    This makes no sense at all. EA and Indicator can use the same function and the same library. The function reflects the core of this logic, the indicator only a visualization. There is absolutely NO logic in the indicator. An iCustom() call would turn this technical hierarchy upside down. It is a workaround that can be used if no other solution is at hand. That is not the case here. If you can provide only one reasonable argument why an iCustom-based function is better for a function test, I will be happy to code it. Until now, I failed to recognize such an argument. @VlanFx is doing a really good job as the ‘CTO’ of this project. He will surely tell me if he needs such a function, from a coder’s point of view. And I’m sure he would provide a technical explanation, from one coder to another.

                                                    MQH, MTF’s, Trend, etc etc…. will come later, after this stage is finished.

                                                    I did not post my MTF indicator. Did you hack my PC? And BTW: your proposal of a triple timeframe solution is in one of the earliest posts of your thread. I considered FIFO being a good choice as long as you do not come up with a list of priorities in the specification document.

                                                    Also, need to finish implementing, in this stage, FFCAL news filtering, Max Spread, Monday trading, Friday close, etc.

                                                    Is it in the spec sheet already?

                                                    Smaller and definite solid steps will get us quicker to the target.

                                                    I don’t think my step was that big. It is ONE function. You want less?

                                                    Please be so kind and check my indicator. It’s your idea, ‘Peak and Trough’ or ‘Clear Method’ or whatever. You demand debugged code. From my point of view, my indicator is debugged (technically). You demand an indicator that can be tested (functionally). I posted this indicator. If new technical issues should arise during functional test, I’ll take care for that.

                                                    If it’s more convenient for you, I will merge mq4 and mqh into one file. Just drop me a line.

                                                    I don’t think that this project needs a professional specification doc of a hundred pages, but a concise list, with priorities included, would possibly enhance our workflow as a team. And ideally, this SpecDoc would be updated when intermediate goals are achieved, new topics are included, priorities have changed, etc.

                                                    First part of this SpecDoc would be the functional side, ideally written by @gg53 (you’re running this!) Second part would be the technical one, ideally written by @VlanFx, reflecting which modules have been finished, and what has to be done, and possibly who does it. Don’t get me wrong: this should be no more than a concise list of bullet points including priorities and a fulfillment marker.

                                                    Goal: transparence for all contributors and the two project managers.

                                                    I would volunteer to set up such a list, starting at my already compiled doc, which @gg53 approved by PM. My initial list would probably be incomplete, requiring both G. and V. to complete it. Then we should find some kind of communication protocol about this doc. It would be certainly the easiest way if we split the doc in two parts, G. maintaining the functional part, and V. the technical, and both posted their modifications to this doc.

                                                    Just my two and a half cents for now.

                                                    Yes we can, but more clarity is required.

                                                    s.

                                                    A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)

                                                    #10626
                                                    smallcat
                                                    Participant

                                                       

                                                      In the “Init” function: Previous Bar HighestHigh = High[Bars – 1]; Previous Bar LowestHigh = High[Bars – 1]; Previous Bar HighestLow = Low[Bars – 1]; Previous Bar LowestLow = Low[Bars – 1]; G.

                                                      Thanks a lot G … and thanks for the great link too :good:
                                                      Wow, so many great developments here and at main thread … thanks guys :good:

                                                      Edit: ( delete. Content and links is already provided by simplex. Sorry ).

                                                       

                                                      • This reply was modified 8 years, 7 months ago by smallcat.
                                                      • This reply was modified 8 years, 7 months ago by smallcat.
                                                    Viewing 25 posts - 1 through 25 (of 170 total)
                                                    • You must be logged in to reply to this topic.
                                                    Scroll to Top