Heiken Ashi smoothed

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #17559 quote
    torkelab
    Participant
    Senior

    Hi there!

    I´m a newbie and this is my first indicator query 🙂

    I found this in the web, but it doesen´t work in this state, its giving syntax error and I don´t have the skill yet to correct it.
    Could someone have mercy with me? I think it is a quite simple error..

    This is the link, it´s in french.
    http://sohocool.over-blog.com/article-29022036.html

    Here is the code: Syntax error line 28, 30

    /// Heiken ashi smoothed histogram
    
    // Average variable p = 1 period (default = 6) and t = mm Type (default smoothing wilder)
    
    // Average variable 2 p1 = period (default = 2) and t1 = mm type (weighted default)
    
    {// t and the deviation of the mean: 
    t = 0 = simple average 
    t = 1 = exponential average 
    t = 2 weighted average = 
    t = 3 = average wilder 
    t = 4 = average triangular 
    t = 5 = average end-point 
    t = 6 = average time series}
    
    // set histogrammme
    
    
    if BarIndex> p Then 
    mo = average [p, t] (open) 
    mc = average [p, t] (close) 
    ml = average [p, t] (low) 
    mh = average [p, t] (high) 
    endif
    
    
    haopen ounce = mo
    
    haclose = (mc mo + + + mh ml) / 4 
    if BarIndex> p + 1 then 
    haopen = (haopen [1] + haclose [1]) / 2 
    endif
    
    haopen1 average = [p1, t1] (haopen) 
    haclose1 average = [p1, t1] (haclose)
    
    if haclose1> haopen1 Then 
    a = 1 
    else 
    a = -1 
    endif
    
    
    return 1 colored by aa as "Smoothed Heiken Histo"
    
    ///////// end
    
    
    cloud code to open in the graph:
    
    
    /// Heiken ashi smoothed histogram
    
    // Average variable p = 1 period (default = 6) and t = mm Type (default smoothing wilder)
    
    // Average variable 2 p1 = period (default = 2) and t1 = mm type (weighted default)
    {t and the deviation of the mean: 
    t = 0 = simple average 
    t = 1 = exponential average 
    t = 2 = weighted average 
    t = 3 = average wilder 
    t = 4 = average triandulaire 
    t = 5 = average end-point 
    t = 6 = average time series}
    
    if BarIndex> p Then 
    mo = average [p, t] (open) 
    mc = average [p, t] (close) 
    ml = average [p, t] (low) 
    mh = average [p, t] (high) 
    endif
    
    
    haopen ounce = mo
    
    haclose = (mc mo + + + mh ml) / 4 
    if BarIndex> p + 1 then 
    haopen = (haopen [1] + haclose [1]) / 2 
    endif
    
    haopen1 average = [p1, t1] (haopen) 
    haclose1 average = [p1, t1] (haclose)
    
    
    haopen1 return as "Smoothed Heiken Nuageopen" haclose1 as "Smoothed Heiken nuageclose"
    
    
    ///////end
    
    
    
    
    #17563 quote
    Nicolas
    Keymaster
    Master

    You made wrong copy/paste of the 2 codes and into a single one too ..

    Please find attached the modified and fixed version to import directly into prorealtime.

    Iván González thanked this post
    #17584 quote
    torkelab
    Participant
    Senior

    Thanks a lot Nicholas, very kind of you!

    I also found this indicator on your eminent website, but it seemes only to work in 10.3 and I have 10.2..?

    Is it possible to have a beta PRT10.3 working in the IG-world or do we have to wait for the official one? Have you heard anything about when?
    I would love to get my hands on it and get rid of the inside-bar problem when backtesting.

    DRAWBARCHART

    //Smooth Heiken Ashi barchart
    
    period = 20
    
    if barindex>period then
    
      avgO = average[period](open)
      avgH = average[period](high)
      avgL = average[period](low)
      avgC = average[period](close)
    
      HAClose = (avgO+avgH+avgL+avgC) /4
      HAOpen = (HAOpen[1]+HAClose[1]) / 2
      HAHigh = MAX(avgH,MAX(HAOpen,HAClose))
      HALow = MIN(avgL,MIN(HAOpen,HAClose))
    
       IF avgO <= avgC THEN
         // Green candlestick
         DRAWBARCHART(HAOpen,HAHigh,HALow,HAClose) COLOURED(0,255,0)
       ELSE
         // Red candlestick
         DRAWBARCHART(HAOpen,HAHigh,HALow,HAClose) COLOURED(255,0,0)
       ENDIF
    endif
    
    RETURN
    #17588 quote
    Nicolas
    Keymaster
    Master

    You’ll have to wait until next year for 10.3 if you are an IG customer, you’ll get the ETA information directly @ IG

    #17603 quote
    torkelab
    Participant
    Senior

    Aha, you mean draw barchart is not possible in prt 10.2?

    #17614 quote
    Nicolas
    Keymaster
    Master

    Exactly, this is a part of PRT 10.3 new graphical instructions. I should make the tag “prorealtime 10.3” more readable in the documentation’s pages I believe 🙂

    torkelab thanked this post
    #252731 quote
    Erreerra
    Participant
    New

    Hi Nicolás, do you have a screener that detects color changes on the Heiken Ashi Smooth indicator?
    Thanks for your work.

    #252734 quote
    jacquesgermain
    Participant
    Senior

    Hello voir screener ci-joint

    Erreerra thanked this post
    #252736 quote
    Erreerra
    Participant
    New

    Merci beaucoup, Jacques.
    Je constate dans les résultats que vous sélectionnez de nombreuses valeurs sans changement de couleur dans le HAS. Est-ce normal ? Quels paramètres sont sélectionnés ?
    Le Heiken Ashi Smooth que j’utilise est celui-ci :

    #252777 quote
    jacquesgermain
    Participant
    Senior

    Hello voici ci-joint proscreener associé à votre indicateur pour détecter rouge vers bleu

    robertogozzi thanked this post
    #252786 quote
    Erreerra
    Participant
    New

    Merci beaucoup Jacques, je l’ai essayé et ça fonctionne parfaitement.

    Une dernière chose, si ce n’est pas trop demander, le screener pourrait-il être réglé pour sélectionner également les valeurs qui ont changé de couleur, mais sur la bougie précédente ?

    #252789 quote
    jacquesgermain
    Participant
    Senior

    Hello voici ci-joint proscreener associé à votre indicateur pour détecter rouge vers bleu today et yesterday

    Erreerra thanked this post
    #252959 quote
    Erreerra
    Participant
    New

    Merci Beaucoup, Jaques.

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.

Heiken Ashi smoothed


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
torkelab @torkelab Participant
Summary

This topic contains 12 replies,
has 2 voices, and was last updated by Erreerra
3 months, 2 weeks ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 11/30/2016
Status: Active
Attachments: 10 files
Logo Logo
Loading...