Blog

Using RangeBars & Renko with StrategyQuant to automatically discover & create trading robots

The latest version of RangeBars PRO & Renko PRO plug-ins includes an additional option in the CSV2FXT script mods – StrategyQuantExport. When enabled, the scripts create a proprietary CSV file, which is compatible with the latest StrategyQuant products. As of version 3.6, StrategyQuant adds support for renko & range bar charts, which enable creating a whole new class of strategies that would not be possible with regular time based charting.

To begin using RangeBar & Renko data with StrategyQuant, you first need to convert tick data into Range/Renko bars using CSV2FXT script mods with StrategyQuantExport set to true and import this data into StrategyQuant’s Data Manager.

CSV2FXT-to-StrategyQuant

It is wise to create a number of different bar sizes for various instruments and import this data into StrategyQuant’s Data Manager for later use.

To import the created data files, you need to go to the Data Manager tab in StrategyQuant, add new symbol(s) and populate them with data. The process is very simple and only requires a few basic steps.

Start with Add symbol…

SQ1

First, type in the Symbol name and remember to use names that will pass all the relative information and enable you to quickly identify the chart you want to use in the strategy building process. For example, you can choose GBPUSD_10Range to label a 10 pip RangeBar chart of GBPUSD. Once you have that done, make sure that you select the Data type as “Timestamp represents start of bar time (MetaTrader, Dukascopy data)” and that you set the remaining fields according to your chosen instrument. When done click OK to save the symbol.

Now it is time to populate the symbol’s record with data exported by the CSV2FXT script for Renage or Renko (depending on the type of chart data you wish to import). This is done by pressing Import data.. for the selected symbol.

SQ2

The Predefined File Format needs to be “AZ-Invest Range/Renko data format” and you need to select the correct CSV file. Once the file is chosen, press Start Import.

CSV2FXT script mods will use the following naming convention to simplify locating the file you need: XXXYYY_ZZpip_BARTYPE, where XXXYYY is the symbol name, ZZ will be set to the barSize setting chosen in CSV2FXT and BARTYPE will be either range bars or renko.

When the process is finished you will see the new symbol with Intraday timeframe and imported data time span along with selected symbol properties.

SQ3

At this point, you can move on to strategy building, where you need to choose the selected range/renko chart as your data for testing. This is done in the Settings / Data tab of Build Strategies by selecting the desired symbol.

SQ4

The rest of the strategy building process is exactly the same as with regular time-based charts.

10

Comments

  1. plastikman  April 18, 2014

    i’ve the Pro verrsion for MT4, but not found the CSV2FXT script mod for Renko.
    where can i get it ?
    thanks

    reply
    • admin  April 20, 2014

      Please use the download link provided in the e-mail you received after the purchase was made. The script will be visible in your Navigator Window of MT4 (under the Scripts branch).

      reply
  2. nolube  May 6, 2014

    I don;t have the option to select ‘Intraday’ from the period. what should I do? Thanks

    reply
  3. PA5B  February 11, 2015

    Hello,
    What Bar type of CSV2FXT i should use when exporting to Quant?
    When using bartype 2, strategies generated by Quant are failing in MT4 backtest for same dates 🙁

    Another question, is StratagyQuant actually aware than renko open price is not real a price at first tick?
    And should we inject CustomChartingBacktest.mqh into generated EA?

    reply
    • admin  February 11, 2015

      You should generally utilize bar type 1 (renko with wicks).
      As I recall SQ does not utilize tick data, it uses complete bar analysis instead and it also creates the EA code using the same principle.
      The author or SQ requested a special format for use with his products and has tested it for compatibility.
      You can read more about using custom charts with SQ on the SQ blog (the post is for range bars, but the foundation remains the same)

      It is recommended that CustomChartingBacktest.mqh is injected into the EA code for backtesting only. In a live scenario this does not do anything (it can be left injected, but it does not have to be).

      reply
      • PA5B  February 11, 2015

        Ok. Tried with bar type 1. I Created profitable EA in SQ and then tried to run it in MT4 on renko chart (used your renko tools) with the same date range as my IS (In Sample) in SQ. It Failed miserably in MT4, Balance went to zero within 1/3 of the range.

        Here is exact process i did to test it:
        1. Used Tickstory Lite to download data
        2. Used MT4 CSV2FXT_renko_mod to generate CSV for SQ (bar size 5, bar type 1, SQ export true, spread 2.0, fcsv filename pointed to GBPUSD.csv which was generated by Tickstory Lite).
        3. Loaded generated csv to SQ
        4. Created strategy which shows profit in both IS and OOS
        5. Saved strategy as EA.
        6. In MT4 generated FXT( once again for any case) using CSV2FXT_renko_mod (bar size 5, bar type 1, SQ export false, spread 2.0, fcsv filename pointed to GBPUSD.csv which was generated by Tickstory Lite).
        7. Restarted MT4, Loaded EA, selected every tick , picked correct pair (GBPUSD), selected exact same date range as in SQ. And EA failed miserably with 0 balance at the end.

        Please Help! I bough your Renko Charts in hope to get properly working backtests and support.. What I’m doing wrong?

        reply
        • admin  February 11, 2015

          Please open a ticket with support and send me the CSV file you are using plus the SQ strategy file so I can test and offer further support.

          reply
        • ZackFX  September 7, 2015

          Did you work out how to fix this? I’m finding the exact same thing happening to me at the moment.

          Thanks

          reply
          • admin  September 19, 2015

            Most likely, your problem (as the problem above) is related to having different spread values when generating a strategy in SQ and backtesing the generated EA in MT4.
            Please note that starting from MT4 builds 8xx, the Spread field in the MT4 backtesting pane overrides the spread configured for the FXT file.

Add a Comment