fxDreema

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

    Renko Charts and once per bar function

    Questions & Answers
    3
    13
    2771
    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.
    • H
      holygrailfx last edited by

      I am wondering if the once per bar function really works on renko offline charts
      when running an EA live I want to delete a group of pendings orders at the start of a new bar if somm conditions are met.
      The pendings grid is then regenerated with new values, and should not be deleted again until an new bar is formed

      when I manually program I used the following function, which worked

      //input parameter
      int thisbar =0;

      //then to test whether is is valid
      if (Bars != thisbar)
      {
      thisbar = Bars;

      //do something here
      }

      is it true that on renko the once per bar does not work?
      if yes can we change the once per bar function or add a custom one?
      if no can you help me to solve my problem?

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

        The last time I tried Once per bar with Renko charts, it worked for me. Probably because my renko-creator-ea puts different Time for each renko candle that it creates. But Renko is not a standart in MetaTrader, I have no idea what EAs you are using to generate these offline charts... at least someone can give me his EA so I can test it. But mine seems to work

        ......
        renkolivecharts_pimped_v4_13.mq4

        1 Reply Last reply Reply Quote 0
        • H
          holygrailfx last edited by

          I use the following, it is an indicator

          ......
          ! MTH b700+ Accel Shift Flip Renko Builder Indi.ex4

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

            What a strange looking candles 😮 But it's Saturday now, I will be able to test it in Monday

            Anyway, I decided to see what Times are returned and everything looks fine http://prntscr.com/7wotrs The top 4 values in the comment are Time, below are Candle Close prices. From what I see, "Once per bar" must work as expected.

            1 Reply Last reply Reply Quote 0
            • H
              holygrailfx last edited by

              Yes very strange 😉 i Like them
              Just so you know the BrickStepTime function does not wrok properly, just set to false
              If you want I can send you my template, let me know

              considering the times, if they are the time of the previous bar they are correct, I think the indicator writes the times and open and close prices at the closure of the bar,
              but within the current bar my fucntions, I send a sendnotification after a once per bar, and it gets executed every tick or at least very often

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

                I got this: http://prntscr.com/7xhwbn
                Arrows are put on the previous candle and the value of Time[0] changes. I think it's not correctly written or something like that. With normal candles each candle has it's own unique Time and it does not change. It's the same with my Renko EA. This one... I don't know what can be used to detect new candles. For a while I was thinking that Candle Open can be used, but it just created a new candle that is exactly on the same level as the previous: http://prntscr.com/7xhz3i

                1 Reply Last reply Reply Quote 0
                • H
                  holygrailfx last edited by

                  I know it is a bit weird
                  but I would really appreciate if we can figure it out
                  this renko has two exceptional functions: you set the size of the flip, this takes out a lot of whipsaw, and you can determine the size of trend confirmation, so if price moves with the trend you can set a renko bar to 100points(10pips), have a new bar create when price moves with trend of example 20point (2pips), but only a countertrend is created when the bar flips 100%, so a reverse of 200point, 20pips.
                  This allows me to trade price directly on the chart without an additionla indicator, this indicator takes care of smoothing and whipsaw

                  Anyway, before starting to use your incredible tool, I did some MQ4 coding, a lot of copy past of course,

                  I used the following to assure my EA only executed a certain block once per bar, which worked
                  can I just create a custom block for this, if yes some help would be appreciated

                  // on global
                  int thisbar = 0;

                  //then within a certain block
                  void do_trend()
                  {
                  if (Bars != thisbar)
                  {
                  thisbar = Bars;

                  // declare some function

                  }

                  Bars just simply counts the number of bars in history and compares to my value
                  if different we execute, is same we dont execute

                  Hope this helps

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

                    What if we have this situation: http://prntscr.com/7xkebh

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

                      I don't like Bars, because it depends on our settings. But I realised that we can use bar 1 instead of bar 0 with the same success. The Time of bar 1 also changes when a new bar is created, so it can be used for online charts. In your chart Time (1) is at least constant while the candle exists. I just changed one value from 0 to 1 in "Once per bar" and it works now, you can try it.

                      There are other blocks that have the same "once per bar" functionality in them and I "fixed" some of them... hopefully all of them, but if you find that some block shoud do something 1 time per bar and it does not, tell me.

                      1 Reply Last reply Reply Quote 0
                      • H
                        holygrailfx last edited by

                        That sounds great!
                        So I recompile my EA and test for once per bar

                        I will confirm at the end of day

                        Thanks

                        1 Reply Last reply Reply Quote 0
                        • H
                          holygrailfx last edited by

                          end of day, became this morning
                          but as far as I can tell, the once per bar function works perfectly now!

                          THANKS

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

                            Hello...
                            I'm having issues making an EA work with renko offline charts. How did you make it possible?

                            Thanks

                            __end of day, became this morning
                            but as far as I can tell, the once per bar function works perfectly now!

                            THANKS[/quote:2915fvtz]

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

                              Give me your renko... EA, indicator or whatever it is... I know that there are many robots and versions out there, I can't say what is wrong if I don't know which one of them is used. And also tell me what is the problem exactly

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

                              Online Users

                              R
                              F
                              S
                              D
                              V

                              37
                              Online

                              146.7k
                              Users

                              22.4k
                              Topics

                              122.6k
                              Posts

                              Powered by NodeBB Forums | Contributors