NexusFi: Find Your Edge


Home Menu

 





Converting market replay data to historical data


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one afoschini with 6 posts (0 thanks)
    2. looks_two MichaelH with 2 posts (0 thanks)
    3. looks_3 logindejavu27 with 2 posts (3 thanks)
    4. looks_4 rleplae with 1 posts (0 thanks)
    1. trending_up 3,529 views
    2. thumb_up 3 thanks given
    3. group 7 followers
    1. forum 11 posts
    2. attach_file 0 attachments




 
Search this Thread

Converting market replay data to historical data

  #1 (permalink)
 afoschini 
Roma Italy
 
Experience: Intermediate
Platform: ninjatrader
Broker: Webank
Trading: Emini, currency, Crude CL
Posts: 16 since Jan 2018
Thanks Given: 11
Thanks Received: 10

Hi,

I have just finished to code my first strategy for NT (intraday ES trading), using market replay to debug code, and now I am ready to proceed with following testing phases.
I have got several years of MR data for various ES contracts (since 2013) but no 30 minutes historical data to backtest the strategy.
So I was thinking about coding a simple indicator that could make the conversion, replaying the contracts and writing a csv file with historical data.

Does it makes sense? Is there a smarter way to get historical market data? Does anyone gas already implemented something similar?
Thanks
Andrea

Sent using the NexusFi mobile app

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Strategy stop orders partially filled
EasyLanguage Programming
MC PL editor upgrade
MultiCharts
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
REcommedations for programming help
Sierra Chart
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
22 thanks
What is Markets Chat (markets.chat) real-time trading ro …
19 thanks
ApexTraderFunding.com experience and review
15 thanks
GFIs1 1 DAX trade per day journal
15 thanks
EG Indicators
11 thanks
  #2 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,863

If you have replay data and were able to do testing, why would you do back-testing on 30 min ?
the 30 min data will create a situation where you don't know if the target was first reached
of the stop first (large swing)

With the replay data you should be able to do much better back-testing

Or did i miss something on what you want to do ?

Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #3 (permalink)
 afoschini 
Roma Italy
 
Experience: Intermediate
Platform: ninjatrader
Broker: Webank
Trading: Emini, currency, Crude CL
Posts: 16 since Jan 2018
Thanks Given: 11
Thanks Received: 10


With backtesting I aim mainly to Statistical analysis over a large number of years and to Montecarlo analysis to identify an estimate of maximum drawdown. NT provide these features with the Strategy Analyzer and you need historical data to use it.
Of corse you could implement a statistic engine and a Montecarlo Simulator as indicators/addon but it would be a hell of a work.



Inviato dal mio SM-A310F utilizzando Tapatalk

Started this thread Reply With Quote
  #4 (permalink)
 
MichaelH's Avatar
 MichaelH 
Munich Germany
 
Experience: Intermediate
Platform: NinjaTrader, MetaTrader
Broker: S5
Trading: DAX, ES
Posts: 53 since Dec 2013
Thanks Given: 75
Thanks Received: 43


afoschini View Post
Hi,

I have just finished to code my first strategy for NT (intraday ES trading), using market replay to debug code, and now I am ready to proceed with following testing phases.
I have got several years of MR data for various ES contracts (since 2013) but no 30 minutes historical data to backtest the strategy.
So I was thinking about coding a simple indicator that could make the conversion, replaying the contracts and writing a csv file with historical data.

Does it makes sense? Is there a smarter way to get historical market data? Does anyone gas already implemented something similar?
Thanks
Andrea

Sent using the NexusFi mobile app



What about getting a demo account , downloading all the historical data you need and do your testing.


Sent from my iPad using futures.io futures trading

Reply With Quote
  #5 (permalink)
 afoschini 
Roma Italy
 
Experience: Intermediate
Platform: ninjatrader
Broker: Webank
Trading: Emini, currency, Crude CL
Posts: 16 since Jan 2018
Thanks Given: 11
Thanks Received: 10

Interesting point, altough I already tried some of them and found constraints in the lookback period. It seems reasonable since demo account is given for evaluation purposes only. Anyway I am already paying for a Premium account of market replay data.that's why I was asking about a conversion tool.

Sent using the NexusFi mobile app

Started this thread Reply With Quote
  #6 (permalink)
 
MichaelH's Avatar
 MichaelH 
Munich Germany
 
Experience: Intermediate
Platform: NinjaTrader, MetaTrader
Broker: S5
Trading: DAX, ES
Posts: 53 since Dec 2013
Thanks Given: 75
Thanks Received: 43


afoschini View Post
Interesting point, altough I already tried some of them and found constraints in the lookback period. It seems reasonable since demo account is given for evaluation purposes only. Anyway I am already paying for a Premium account of market replay data.that's why I was asking about a conversion tool.

Sent using the NexusFi mobile app



You could write an indicator which exports what you need and then let it run in market replay. But it depends how many days / years you want to convert - might take to long even on max speed . Every other method would require to process the raw replay files - not sure whether the file format / structure is known


Sent from my iPad using futures.io futures trading

Reply With Quote
  #7 (permalink)
 afoschini 
Roma Italy
 
Experience: Intermediate
Platform: ninjatrader
Broker: Webank
Trading: Emini, currency, Crude CL
Posts: 16 since Jan 2018
Thanks Given: 11
Thanks Received: 10

Yes this is what I am about to do. Market replay replays every contract at the same time. So the indicator will have to switch instrument at rollover date.and dump data in a csv file.will share the code when done.

Sent using the NexusFi mobile app

Started this thread Reply With Quote
  #8 (permalink)
 logindejavu27 
Berlin, Germany
 
Experience: None
Platform: NinjaTrader, Custom
Broker: NinjaTrader, IB
Trading: Moving prices
Posts: 9 since Mar 2019
Thanks Given: 3
Thanks Received: 10


afoschini View Post
Hi,

I have just finished to code my first strategy for NT (intraday ES trading), using market replay to debug code, and now I am ready to proceed with following testing phases.
I have got several years of MR data for various ES contracts (since 2013) but no 30 minutes historical data to backtest the strategy.
So I was thinking about coding a simple indicator that could make the conversion, replaying the contracts and writing a csv file with historical data.

Does it makes sense? Is there a smarter way to get historical market data? Does anyone gas already implemented something similar?
Thanks
Andrea

Sent using the nexusfi.com mobile app

Here is strategy to convert market replay to csv/ticks: NT8 download section link

Reply With Quote
Thanked by:
  #9 (permalink)
 afoschini 
Roma Italy
 
Experience: Intermediate
Platform: ninjatrader
Broker: Webank
Trading: Emini, currency, Crude CL
Posts: 16 since Jan 2018
Thanks Given: 11
Thanks Received: 10


logindejavu27 View Post
Here is strategy to convert market replay to csv/ticks: NT8 download section link

Thank you logindejavu27. In the mean time I coded an indicator myself to get the task done, but I will check your reference.

Bye
Andrea

Started this thread Reply With Quote
  #10 (permalink)
 logindejavu27 
Berlin, Germany
 
Experience: None
Platform: NinjaTrader, Custom
Broker: NinjaTrader, IB
Trading: Moving prices
Posts: 9 since Mar 2019
Thanks Given: 3
Thanks Received: 10



afoschini View Post
Thank you logindejavu27. In the mean time I coded an indicator myself to get the task done, but I will check your reference.

Bye
Andrea

Hi Andrea,

Yes, this is how I started, but I found that it takes forever to save ticks from market replay when it comes something more than month or few month even with Max speed of the replay. Of course if you need only couple days than sawing manually can work.

Reply With Quote




Last Updated on November 7, 2022


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts