Range bars

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #13332 quote
    Rosseau
    Participant
    Average

    I would like to be able to use range bars in strategy creation but it is not possible from a standard PRT range bar chart. I only have seen examples with Renko boxes and Heikin-Ashi used in strategies. Anyone having an idea what the code for range bars looks like?

    #13336 quote
    Nicolas
    Keymaster
    Master

    Range bars are constructed from ticks received by the broker, is this right?
    I think we could do something to make an indicator that simulate range bars. But we couldn’t get the history, it has to be constructed in real time.

    #13373 quote
    Rosseau
    Participant
    Average

    Yes, probably derived from tick data originally, but in order to use it in automated strategies maybe one have to simulate it from second data (then it would be possible to at least have some history as well). If the range within a one second bar (or selected period) or gap between two periods exceeds the set range parameter I guess it should appear as a gap between the two simulated range candles as well.

    I also want to thank you for your work with this site, it is amazing to see the offort put in and the outcome produced by all, but especially from you. Great work!

    #13378 quote
    Nicolas
    Keymaster
    Master

    It reminds me that I have coded a point & figure custom indicator recently for a customer. It’s pretty much the same here.

    Don’t worry, it has awake my interest since I’m an huge fan of non-time dependent price charts. I know very well range bars. PRT load only once the history, when you open a chart, but the construction is made of the previous OHLC saved in its history database (must confirm this for tick charts though..). So because we need to know each direction of ticks, we can’t construct previous range bars (with custom coding), only them that can catch the live ticks.

    It would be not so complicated to code a custom indicator that simulate the range bars construction. But! because we can’t stop the time on a normal timeframe (from 1s to monthly), each technical indicator that you’d like to add on this pseudo range bars would need a deepest recoding.

    #13406 quote
    Rosseau
    Participant
    Average

    OK, (think) I understand. Sounds promising anyway, so if you have a slot in your “queue” later on I think it can be worth the effort.

    #13899 quote
    Nicolas
    Keymaster
    Master

    I had a look at this, this morning. I’m afraid it is not possible because we cannot catch each tick until a new close of the current candlestick. I hope it would be possible with the future multitimeframe support. Until then, this project is somehow “paused” 🙂

    #24138 quote
    paulon
    Participant
    Average

    Hi. Is it possible to create an alert when range bars change colour?  I also agree with Rosseau –  thanks for your great work on this site!

    #24146 quote
    Nicolas
    Keymaster
    Master

    Yes it’s possible to make an indicator that draws visual signals and from what you could use the alerts options of the platform. Changing colors of range bars is pretty much the same than changing colors of Heikin Ashi candelsticks (or any other candles formats), you’ll find a lot of examples on forums I’m sure.

    #50143 quote
    paulon
    Participant
    Average

    Hi Nicolas.  I cannot find an example of how to get an alert if a range bar changes color. Can you help please?

    #50385 quote
    Nicolas
    Keymaster
    Master

    This is just an example:

    bull = close>open
    bear = close<open
    
    if (bull and bear[1]) or (bear and bull[1]) then
    drawarrow(barindex,low)
    endif
    
    return
    range-bars-change-indicator.png range-bars-change-indicator.png
Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.

Range bars


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Rosseau @rosseau Participant
Summary

This topic contains 9 replies,
has 3 voices, and was last updated by Nicolas
8 years, 4 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 09/20/2016
Status: Active
Attachments: 4 files
Logo Logo
Loading...