fxDreema

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

    WORKING WITH PIVOT LINES

    Questions & Answers
    2
    13
    8323
    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.
    • J
      Jaychyke last edited by

      Hello Fxdreema,
      I've been working to produce an EA that will draw the following pivot lines (R4, R3, R2, R1, Pivot, S1, S2, S3, S4) on a chart. The EA on compilation successfully drew R3, R2, R1, Pivot, S1, S2, and S3 lines on the chart, but not R4 and S4. I've tried every trick I know without success; my R4 which should ideally be placed after R3 appears below the Pivot line, S4 is nowhere to be found. shared/laLuGxmle is how far Ive gone. Please help!

      J 1 Reply Last reply Reply Quote 0
      • J
        Jaychyke @Jaychyke last edited by

        @Jaychyke said in WORKING WITH PIVOT LINES:

        Hello Fxdreema,
        I've been working to produce an EA that will draw the following pivot lines (R4, R3, R2, R1, Pivot, S1, S2, S3, S4) on a chart. The EA on compilation successfully drew R3, R2, R1, Pivot, S1, S2, and S3 lines on the chart, but not R4 and S4. I've tried every trick I know without success; my R4 which should ideally be placed after R3 appears below the Pivot line, S4 is nowhere to be found. shared/laLuGxmle is how far Ive gone. Please help!
        The link is https://fxdreema.com/shared/laLuGxmle
        The

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

          Obviously S and R levels are up to 3, there is no R4 and S4 and there is no need to try tricks to get something that is not defined. There is certain MQL code behind this option in Condition and at the moment R4 and S4 are not part of it. I guess that back in the day when I was making this option I found information for calculations only up to 3 level, as it is here for example: http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators:pivot_points I added this option because people asked for pivot points over and over, but this is not native MQL option. Normally such calculations are done in indicators, especially when you only need to draw the lines. If you only want lines, better find some indicator to do that, because it will do it in much better way. The option in Condition should be used to quickly get those values without using indicator and without printing lines

          1 Reply Last reply Reply Quote 0
          • J
            Jaychyke last edited by

            Good day and Happy new year Fxdreema,
            I have tried to modify all the formulae from S4 up to R4. I have tried to use "Condition" for the EA to recognise these values, and make them tradeable, but the EA does not yet recognise those values. What am I doing wrong that makes the EA not to "recognise/see" these my pivot variables? See what I have done so far https://fxdreema.com/shared/LaqDgyJ7b, and kindly suggest any improvement(s) in affected blocks.

            Again, if I may suggest an improvement to your software, it is good you added pivot values, but please see the possibility of creating the option to select Pivot values based on type of pivot calculation and timeframe. Also give opportunity of defining extended pivots values of R4, S4, and any others.

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

              I think that at the moment S3 and R3 are wrong. I also found that there are different ways to calculate - https://quivofx.com/indicator/pivot-points/ I will use these formulas to update this feature

              1 Reply Last reply Reply Quote 0
              • J
                Jaychyke last edited by

                Thanks for the prompt reply. And many thanks for the link you provided. I could work on the wrong values, but could they be the reason why the EA is not "seeing" or calculating the other pivot values, in spite of the formulae specified? What can I do, apart from correcting R3 and S3 calculations, to make the EA trade these pivot values?

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

                  https://fxdreema.com/forum/topic/4289/january-2017

                  While looking for information about these Pivot Point methods, I found that the formulas are sometimes different in different sources. Maybe they are not standard.

                  Compare those 2 sources:
                  http://www.babypips.com/school/middle-school/pivot-points/how-to-calculate-pivot-points.html
                  https://quivofx.com/indicator/pivot-points/

                  In Babypips they say: Third resistance (R3) = High + 2(PP – Low)
                  In quivofx this is R3 for Woodie Pivot Points, not for the Classic formula!

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

                    So, I added few new options and you can test them. You can also look at the source code (if you understand) or compare the output values with some indicators to confirm that all calculations are correct. I'm not 100% sure that they are, because of the different formulas in different sources. And who knows, maybe I wrote some letter wrong, wut I was working on this for hours and this is all from me for now.

                    Something that is nowhere written - if you have Candle ID = 0, pivot points are calculated based on candle 1. The timeframe should be chosen, better don't leave it to default value. Unfortunately the default value for this particular parameter is global, because the parameter is global, I can't set it let's say Daily only for Pivot Points.

                    1 Reply Last reply Reply Quote 0
                    • J
                      Jaychyke last edited by

                      You're the man, you listen! Thanks so much for the sacrifice, I really appreciate!

                      1 Reply Last reply Reply Quote 0
                      • J
                        Jaychyke last edited by

                        I guess by default the Pivots change with new candles/bars. Kindly consider adding the option to specify a particular candle/bars, or number of consecutive candles (according to the timeframe chosen) on which the pivot calculations should be based. That will be the icing on the cake. Good job so far!

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

                          Isn't it working when you change timeframe and candle in "More settings"?

                          1 Reply Last reply Reply Quote 0
                          • J
                            Jaychyke last edited by

                            Yes, we have "Timeframe" and "Candle ID" in "More settings"; I've chosen H4 as timeframe, but when the Candle ID is left at O, the EA did not run, so I changed the Candle ID to 1, and the EA executed. However, the EA calculations for "Classic Pivot Point" were different from my manual calculations, though my calculations were the same with a custom indicator. I wouldn't know what caused the difference; maybe the default EA calculations were for another candle. You may wish to revisit those calculations to ensure they are correct.
                            I advocate for the inclusion of "Candle Start Time" and "Candle End Time" in more settings. You may wish to add "Choose Candle by" .... "Candle ID" ... or "Candle Time". That would be more specific or give more room in choosing candles for calculations.
                            At current settings one can not choose more than one candle for pivot calculations, that's not good enough.

                            1 Reply Last reply Reply Quote 0
                            • J
                              Jaychyke last edited by

                              I have reasonably confirmed that the builder's Pivot Calculations for Classic Pivot Points are wrong. It is impossible to have the middle pivot line (Pivot) of the last closed candle (as calculated by the EA builder) to be significantly below the middle of the said candle! My manual Classic pivot calculations are correct and same with custom indicators, but those of the builder are way too convergent. Kindly recheck.

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

                              Online Users

                              M
                              N
                              H
                              K
                              W
                              S

                              11
                              Online

                              146.7k
                              Users

                              22.4k
                              Topics

                              122.6k
                              Posts

                              Powered by NodeBB Forums | Contributors