Forums Development Trading made REALLY Simple

This topic has been reported for inappropriate content

Tagged: 

Viewing 25 posts - 151 through 175 (of 456 total)
  • Author
    Posts
  • #10442
    gg53
    Participant

      VlanFx,

      Please add another condition for exiting the pre-check before trade entry:

      //Don’t trade large bars
      //if((High[1]-Low[1])>2*ATR) return;

       

      We can debate if it should be double or more, or make it a user parameter.

      Thanks,

       

      G.

      #10444
      Anonymous

        I’ve added more logic to the current one, using my version of CS, and it’s doing more than Ok on live (demo acct) trades. The problem is that CS can’t be accurately backtested (MT4 backtest consider only current pair currencies), so I suggest we leave CS as a last addition, although I still consider it as major addition to this EA. G.

         

        Great! Looking forward to see how it is working.

        Yes its a shame MT4 EA’s cant be backtested using strategy tester across multiple currencies as MT5.

         

        I saw SL is also ATR based. This is intresting. I have been testing this method many times before but I never got it to preform better than a fixed value in the long run. So im exited to see if it can outpreform a fixed value.

        #10445
        gg53
        Participant

          [quote quote=10438]I’ve added more logic to the current one, using my version of CS, and it’s doing more than Ok on live (demo acct) trades. The problem is that CS can’t be accurately backtested (MT4 backtest consider only current pair currencies), so I suggest we leave CS as a last addition, although I still consider it as major addition to this EA. G.

          Great! Looking forward to see how it is working. Yes its a shame MT4 EA’s cant be backtested using strategy tester across multiple currencies as MT5. I saw SL is also ATR based. This is intresting. I have been testing this method many times before but I never got it to preform better than a fixed value in the long run. So im exited to see if it can outpreform a fixed value. [/quote]

          StopLoss is volatility based, and as such it’s specific to each pair and current market situation.

          When trading long TF’s, it’s almost impossible to do it both effectively and manually, unless you’re “glued” to the screen.

           

          G.

          #10448
          VlanFx
          Participant

            VlanFx, Please add reverse entry logic to EXIT trade if happened before SL. (i.e. if Trough becomes Peak and we entered Long trade – than if it turns back into Trough again -> we exit trade.)

            VlanFx, Please add another condition for exiting the pre-check before trade entry: //Don’t trade large bars //if((High[1]-Low[1])>2*ATR) return; We can debate if it should be double or more, or make it a user parameter. Thanks, G.

            Attached is new version of the PenguinEA
            Changes in logic were made based on GG53 ideas in the quoted posts.
            V.

            Attachments:
            You must be logged in to view attached files.
            #10455
            smallcat
            Participant

              [quote quote=10434]VlanFx, Please add reverse entry logic to EXIT trade if happened before SL. (i.e. if Trough becomes Peak and we entered Long trade – than if it turns back into Trough again -> we exit trade.)

              VlanFx, Please add another condition for exiting the pre-check before trade entry: //Don’t trade large bars //if((High[1]-Low[1])>2*ATR) return; We can debate if it should be double or more, or make it a user parameter. Thanks, G.

              Attached is new version of the PenguinEA Changes in logic were made based on GG53 ideas in the quoted posts. V. [/quote]

              Thanks a lot Vlan :good:  will test it … if it is without trend rule, the result is good … then with trend, it will be really great ….  :good:

              #10456
              smallcat
              Participant

                VlanFx, Please add reverse entry logic to EXIT trade if happened before SL. (i.e. if Trough becomes Peak and we entered Long trade – than if it turns back into Trough again -> we exit trade.) G.

                Hi G, i do not understand this part of logic. We do our Long entry point at Peak, Not at Trough? And we exit that Long trade at Trough, Not at Peak?  :scratch:  Could you pleae explain the reason why we do that? Or i have missed understood it?

                Thanks

                #10464
                john baag
                Participant

                  Hi, I just added the Xmeter Function inside the EA

                  but, I am not able to compile it, for unknown reasons.

                  I put the code in attachement (in case you could correct it for compilation)

                  regards

                  jag

                  #10465
                  Anonymous

                    hi.


                    @VlanFX
                    hi man!

                    I have done some changes, please take a look and see if you think this is ok.

                    • modified _all_ functions (didnt change there algo they work the same) so they can work with any symbol and timeframe
                    • corrected all errors i found. now it doent give any error in tester
                    • added new trailing, old one gave many errors and only trailed for current chart. now it works for the ordersymbol. also added TrailingStep
                    • added tradetimes StartHour, EndHour will determ when trades can be open. if no trades are open and its not within tradetime it will Loop the EA
                    • added near daily pivots filter, dont know if it imporves the end result so mutch but this maby can be modified later on to work better i disabled it for now

                     

                    #10467
                    smallcat
                    Participant

                      [  deleted, wrong post …. ]

                      • This reply was modified 10 years, 6 months ago by smallcat.
                      #10469
                      john baag
                      Participant

                        again

                        #10476
                        gg53
                        Participant

                          [quote quote=10434]VlanFx, Please add reverse entry logic to EXIT trade if happened before SL. (i.e. if Trough becomes Peak and we entered Long trade – than if it turns back into Trough again -> we exit trade.) G.

                          Hi G, i do not understand this part of logic. We do our Long entry point at Peak, Not at Trough? And we exit that Long trade at Trough, Not at Peak? :scratch: Could you pleae explain the reason why we do that? Or i have missed understood it? Thanks [/quote]

                          We enter LONG when we are in Trough area breakout.

                           

                          G.

                          #10477
                          gg53
                          Participant

                            Hi, I just added the Xmeter Function inside the EA but, I am not able to compile it, for unknown reasons. I put the code in attachement (in case you could correct it for compilation) regards jag

                            I don’t like Xmeter as a CS indicator. It’s just numeric, without any sign of current direction of each currency.

                             

                            G.

                            #10478
                            gg53
                            Participant

                              again

                              Please don’t post EA versions here. Read thread instructions.

                              That’s  VlanFx job, and he’s the only one that is permitted to do so.

                              If you want to suggest or add additions – please post code snippet and/or suggested indicator and the way to call it.

                              VlanFx will add it, if found valuable to the EA and logic accepted by other contributors/members.

                               

                              slicken,

                              Same as above…

                               

                              G.

                              #10479
                              Bartleby
                              Participant

                                while my testing , The auto Lot calculation didn´t worked correct. The Lotsize was too big and it couldnt open trades in the strategy tester. I changed a value from 100 to 1000.. highlighted it .. now it works. maybe some help for people with the same issue.

                                // Auto Lot Calculation

                                double CalcLot(int StopLoss)

                                {

                                StopLoss = StopLoss / 10.0;

                                double pipValue = MarketInfo(Symbol(),MODE_TICKVALUE);

                                if (Digits==3 || Digits==5) pipValue *= 10;

                                double step = MarketInfo(Symbol(),MODE_LOTSTEP);

                                int norm = 0;

                                if (step==1) norm = 0;

                                if (step==0.1) norm = 1;

                                if (step==0.01) norm = 2;

                                double minLot = MarketInfo(Symbol(),MODE_MINLOT);

                                double maxLot = MarketInfo(Symbol(),MODE_MAXLOT);

                                double lots = 0;

                                if(StopLoss != 0)

                                lots = AccountBalance()*(Risk/1000.0)/(StopLoss*pipValue);

                                lots = NormalizeDouble(lots,norm);

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

                                #10482
                                VlanFx
                                Participant

                                  @slicken, @johnbaag, @Bartleby, thanks for contributing. I will look into it and post bugfix version later on.

                                  Meanwhile, has anybody thought about how to implement these ideas from GG53:

                                  The logic when Trough changes to Peak is known, and no need to wait for bar close. As soon as this happens you open a Buy…

                                  After some tests/trials: I prefer Buy-Limit @Close +xx, instead of the current Buy-Stop @High+xx. In cases where entry is in mid-bar, entry should be also a Buy-Limit instead of Buy-Stop. Vice versa for Shorts. Advantage: More pips. G.

                                  As I understand it, peak and through areas are defined by relative positions of Highs and Lows. And as long as a candle is being formed, it’s High or Low can change. So only after the candle is Closed, can we know for sure that a through has changed into peak.


                                  @GG53
                                  which Close do you mean: highest Close of the area, or Close of the candle with Highest High ?

                                  Thanks

                                  V.

                                  #10483
                                  gg53
                                  Participant

                                    while my testing , The auto Lot calculation didn´t worked correct. The Lotsize was too big and it couldnt open trades in the strategy tester. I changed a value from 100 to 1000.. highlighted it .. now it works. maybe some help for people with the same issue. // Auto Lot Calculation double CalcLot(int StopLoss) { StopLoss = StopLoss / 10.0; double pipValue = MarketInfo(Symbol(),MODE_TICKVALUE); if (Digits==3 || Digits==5) pipValue *= 10; double step = MarketInfo(Symbol(),MODE_LOTSTEP); int norm = 0; if (step==1) norm = 0; if (step==0.1) norm = 1; if (step==0.01) norm = 2; double minLot = MarketInfo(Symbol(),MODE_MINLOT); double maxLot = MarketInfo(Symbol(),MODE_MAXLOT); double lots = 0; if(StopLoss != 0) lots = AccountBalance()*(Risk/1000.0)/(StopLoss*pipValue); lots = NormalizeDouble(lots,norm);

                                    There is a post above related to this…

                                     

                                    G.

                                    #10486
                                    gg53
                                    Participant

                                      @slicken, @johnbaag, @Bartleby, thanks for contributing. I will look into it and post bugfix version later on. Meanwhile, has anybody thought about how to implement these ideas from GG53: [quote quote=10316]The logic when Trough changes to Peak is known, and no need to wait for bar close. As soon as this happens you open a Buy…

                                      After some tests/trials: I prefer Buy-Limit @Close +xx, instead of the current Buy-Stop @High+xx. In cases where entry is in mid-bar, entry should be also a Buy-Limit instead of Buy-Stop. Vice versa for Shorts. Advantage: More pips. G.

                                      As I understand it, peak and through areas are defined by relative positions of Highs and Lows. And as long as a candle is being formed, it’s High or Low can change. So only after the candle is Closed, can we know for sure that a through has changed into peak. @GG53 which Close do you mean: highest Close of the area, or Close of the candle with Highest High ? Thanks V. [/quote]

                                      For now, Close of the candle with Highest High.

                                      Remember that the Peak & Trough algo is not yet fully complete.

                                      Also, I’m not absolutly sure that I like the MQH lib reference. I much prefer the iCustom call to the Peak&Trough indicator, because this way any change to it will immediatly affect the EA. Otherwise, changes and additions/modification to the indicator requires to sych each such change made also to the MQH file.

                                       

                                      G.

                                      #10487
                                      john baag
                                      Participant

                                        OK

                                        I made a  try by inserting the xMeter function inside the main EA. . this is the Penguin_v1_xmeter.mq4 !!! fork ea. This is only a try, due to the fact, the xMeter is not totally convincing people here

                                        Well, the Xmeter can give some informations about the currency strength

                                        I put this in aim of setting up a new condition for opening new trades

                                        if maincurr > secondcurrency => means LONG

                                        the opposite => means SHORT

                                        Also, 3 or 4 years ago, I found and somtimes rewrote this kind of VSA indys.

                                        may be it could help

                                         

                                        GL

                                        • This reply was modified 10 years, 6 months ago by john baag. Reason: Penguin_v1_xmeter.mq4
                                        • This reply was modified 10 years, 6 months ago by john baag. Reason: Xmeter function
                                        • This reply was modified 10 years, 6 months ago by john baag.
                                        Attachments:
                                        You must be logged in to view attached files.
                                        #10499
                                        bharath4x
                                        Participant

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

                                          Hi G,

                                          Could you please advice the use of “Lowest High” and “Highest Low”.

                                          Thanks!

                                          #10500
                                          simplex
                                          Moderator

                                            @gg53: You wrote Please don’t post EA versions here. Read thread instructions.

                                            I must admit that I failed to find ‘thread instructions’, all I remember at the moment is this post.

                                            Last night I opened the Trading made REALLY Simple: Coder’s Chat to keep information together in one point and remove the clutter from your main thread, keeping it clean.

                                            Could you add your instructions to the first post of your thread, so anybody who drops in ‘by accident’ and likes to contribute has a fair chance to meet your quality requirements?

                                            I appreciate your attitude regarding the quality of this thread, and like to assist by collecting the clutter.

                                            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)

                                            #10503
                                            simplex
                                            Moderator

                                              Also, I’m not absolutly sure that I like the MQH lib reference. I much prefer the iCustom call to the Peak&Trough indicator, because this way any change to it will immediatly affect the EA.

                                              If both indicator and EA are referring to the same MQH lib, there shouldn’t be any problem: recompile both, and you’re done.

                                              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)

                                              #10505
                                              VlanFx
                                              Participant

                                                Hi guys,

                                                here is next bugfix version v.1.1

                                                For changes see history log in source files.

                                                @slicken thanks for your contributions.

                                                V.

                                                EDIT: files reuploaded

                                                • This reply was modified 10 years, 6 months ago by VlanFx.
                                                Attachments:
                                                You must be logged in to view attached files.
                                                #10508
                                                simplex
                                                Moderator

                                                  Hi @VlanFx!

                                                  Thanks for this!

                                                  The mqh name does not match the include directive in the EA file. Misspelled in the code or wrong library posted?

                                                  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)

                                                  #10515
                                                  VlanFx
                                                  Participant

                                                    Hi @VlanFx! Thanks for this! The mqh name does not match the include directive in the EA file. Misspelled in the code or wrong library posted? s.

                                                    Thanks @simplex

                                                    I couldn’t reupload plain source files without the server changing the name all the time. I think it’s because there are files with the same name on the server already. So I zipped them. Hope it works.

                                                    V.

                                                    #10519
                                                    simplex
                                                    Moderator

                                                      @VlanFx

                                                      Ahh, the server again: obviously there’s only one directory for all attachments. I’ve had that also.

                                                      Thanks, 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)

                                                    Viewing 25 posts - 151 through 175 (of 456 total)
                                                    • You must be logged in to reply to this topic.
                                                    Scroll to Top