Heiken Ashi from higher Timeframe do not work

Forums ProRealTime English forum ProBuilder support Heiken Ashi from higher Timeframe do not work

Viewing 15 posts - 1 through 15 (of 21 total)
  • #164075

    Hi

    My need is to get, from the 15min TF, the xopen value from the daily TF.

    The here below code provides

    • correct daily “Heiken Ashi Close” (xClose)
    • uncorrect daily “Heiken Ashi Open” (xOpen) and I fail to understand why.

    Any idea ?

    I search the problem since hours…

     

     

     

    #164098

    Change you code:

    • add ONCE xOpen = Open   as line 2
    • line 3 must be written outside the IF…ENDIF

     

    #164109

    Thank you.

    I get same result and problem

    (e.g. on the stock PDSB – PDS BIOTECHNOLOGY) xOpen shows a result of 5.2883 instead of 4.59

    #164132

    Yes, you are right. It’s really weird!

    I suggest that you hit Ctrl+M from your platform and send a request for assistance.

    Please post any solution you will be suggested. Thank you 🙂

     

    #164134

    OK I do and I will keep you aware of any solution

    Thank you

    #164175

    If you just want the H.A. daily xopen and xclose you should use the xClose updated on the latest 15m bar not the xClose from the previous daily bar.  The next code works for me:

     

    #164184

    It works ! Problem solved !

    and……I understand now why.

    Thank you for your help and time

    #164186

    …i THINK I understand why but… unsure

    And if I want to get data from previous daily Ha, I would do that but seems not working

     

     

     

    #164187

     

    #164196

    pableitor ‘s code works fine as long as you don’t use UPDATEONCLOSE.

    It’s a workaround, but it should not be necessary, as it’s the same code as in prior posts and is executed every 15 minutes like the prior one.

    It’s good it works, but it would be better that the prior code worked as well.

     

    #164198

    Just note that the daily HA Close  is the same than the last 15minutes HA Close of the day, so we must use xClose[1] from the 15minutes timeframe, not the daily.  In order to get the previous day HA data just save it in a couple of variables before updating the daily xOpen and xClose, like this:

    I used your variables names, but for multiple related variables you can use an array as well.

     

    #164211

    Pableitor, Robertogozzi

    Thank you both.

    To be honest : It works but I do not understand why and I am lost with regards to your thoughts.

    Pableitor, thank you very much. Last question: I guess the same function but only applied the simple default TF would be simply

    Thank you again both

    #164237

    @jerome888  I just cleaned the code a little bit so it can be used on any default TF from 1 min up to 1h. BTW its a pity that PRT doesnt give the HA OHLC values as indicator so it would be easier to calculate the MTF values:

    PS Yes your code works fine for the default TF.

    #164241

    Thanks a lot pableitor, I will use replace existing code by this one

     

    #164242

    pableitor – Do not use the ‘Quote’ button unless you are actually quoting someone! Your post had your own text included in a quote and no one else’s text in it.

    • Be careful when quoting others in your posts. Only use the quote option when you need to highlight a particular bit of text that you are referring to or to highlight that you are replying to a particular member if there are several involved in a conversation. Do not include large amounts of code in your quotes. Just highlight the text you want to quote and then click on ‘Quote’.
Viewing 15 posts - 1 through 15 (of 21 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login