Autotrading with Renko Bars

Viewing 9 posts - 16 through 24 (of 24 total)
  • Author
    Posts
  • #144990 quote
    Léo
    Participant
    Average

    Thank you Nicolas,

    Cf the code below.

    It seems to work well on index but not on currencies – need to figure out why !

    Thank you again.

    Defparam cumulateorders = false
    
    //
    
    ATR = AverageTrueRange[14](close)
    Period = 1000
    boxsize = average[period](ATR)
     
    once topprice = close
    once bottomprice = close - boxsize
     
    if(high > topprice + boxsize*2) THEN
    topprice = close
    bottomprice = topprice - boxsize*2
    ELSIF (low < bottomprice - boxsize*2) THEN
    bottomprice = close
    topprice = bottomprice + boxsize*2
    ELSE
    topprice = topprice
    bottomprice = bottomprice
    ENDIF
     
    buy at topprice + boxSize stop
    sellshort at bottomprice - boxSize stop
    #145040 quote
    Nicolas
    Keymaster
    Master

    Everything works fine for me, I put the indicator code for you to test the size of the renko boxes on the graph:

    ATR = AverageTrueRange[14](close)
    Period = 1000
    boxsize = average[period](ATR)
     
    once topprice = close
    once bottomprice = close - boxsize
     
    if(high > topprice + boxsize*2) THEN
    topprice = close
    bottomprice = topprice - boxsize*2
    ELSIF (low < bottomprice - boxsize*2) THEN
    bottomprice = close
    topprice = bottomprice + boxsize*2
    ELSE
    topprice = topprice
    bottomprice = bottomprice
    ENDIF
     
    return topprice,bottomprice
    
    backtest-renko.png backtest-renko.png
    #145043 quote
    Léo
    Participant
    Average

    Merci Nicolas !

    I will use the indicator and the code.

    When applying this kind of code to forex should I use the “pipsize” code ?

    Thank you again

    Best regards.

    #145045 quote
    Nicolas
    Keymaster
    Master

    No, because the ATR value is in price and doesn’t need to be converted.

    #145046 quote
    Léo
    Participant
    Average

    Ok understood !

    Thanks again !

    #162307 quote
    Majellan
    Participant
    Average

    Hello Nicolas,

    Thank you for your work on the Renko code.

    Could you show me please how to modify Renko code so that in certain situations, the system only takes Short trades (e.g.) moving averages trending down.

    And in other situations it only takes long trades.

    Thank you.

    #191604 quote
    Sterk
    Participant
    New

    Hoe kan ik de Renko bar formule implementeren in een autotrading formule met een “Call Functie” ?

    How can I implement the Renko bar formula in an autotrading formula with a “Call Function” ?

    RUS-RocnRoll-2.itf
    #191611 quote
    robertogozzi
    Moderator
    Master

    @Sterk

    Only post in the language of the forumthat you are posting in. For example English only in the English speaking forums and French only in the French speaking forums.

    Thank you 🙂

    #191627 quote
    Sterk
    Participant
    New

    Nicolas,

    How can I  implement the  “Renko candles with the ATR” into my strategy with a “call function” .

    Thank you in advance.

    RUS-RocnRoll-2-1.itf
Viewing 9 posts - 16 through 24 (of 24 total)
  • You must be logged in to reply to this topic.

Autotrading with Renko Bars


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Majellan @pbateson9 Participant
Summary

This topic contains 23 replies,
has 5 voices, and was last updated by Sterk
3 years, 10 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 02/03/2020
Status: Active
Attachments: 3 files
Logo Logo
Loading...