custom timeframe - futures io
futures io futures trading



custom timeframe


Discussion in NinjaTrader

Updated
    1. trending_up 1,709 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 3 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

custom timeframe

(login for full post details)
  #1 (permalink)
Europe
 
Experience: Beginner
Platform: NinjaTrader
 
Posts: 73 since Jun 2009
Thanks: 11 given, 53 received

Hello,
i was wondering if it might be possible to have an indicator perform on another individually adjustable timeframe, independent of the timeframe the current chart is set to? e.g. chart is set to 1000 ticks however indicator is based on 5 min.

if so, does anyone have an example they might share or code snippets?

greetings

Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
ZigZag with Depth and Backstep
EasyLanguage Programming
COTbase for quant trading?
Elite Algorithmic NinjaTrader Trading
Webinar: Finding your own way in trading w/Adam Grimes
The Elite Circle
EL/PL for FOPs?
EasyLanguage Programming
Cross border fund flows / fx correlations
Treasury Notes and Bonds
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Battlestations: Show us your trading desks!
137 thanks
Want your NinjaTrader indicator created, free?
32 thanks
Big Mike in Ecuador
30 thanks
Saturday Morning Market Replay!
20 thanks
Selling Options on Futures?
19 thanks
 
(login for full post details)
  #3 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,731 received



toulouse-lautrec View Post
Hello,
i was wondering if it might be possible to have an indicator perform on another individually adjustable timeframe, independent of the timeframe the current chart is set to? e.g. chart is set to 1000 ticks however indicator is based on 5 min.

if so, does anyone have an example they might share or code snippets?

greetings

This is possible. You can code an indicator that performs calculations on another adjustable timeframe. There are a few different solutions:


(1) You can simply add a second bar series to your chart and add an indicator to that bar series. If you do not wish to see it, you can set the second bar series to transparent. The inconvenient of this method is that your chart may suffer from non-equidistant bar spacing.

(2) You can code an indicator that loades secondary bars, which are used for calculations. I have coded a lot of these, and most versions are obfuscated, because it is pretty difficult to do and get a good result.

Examples are:

2a) VisualSMA and VisualEMA: They allow you to calculate the SMA and EMA from minute, tick, volume or Range bars irrespective of your main bar series on the chart. The non-equidistant bar spacing is gone, but you pay a price as the method introduces a little lag. Assume a 500 tick bar which closes at 2:35:42 PM (primary bar) and a 5 min bar which is used for calculating indicator values which closes at 2:35:00 PM. In that case the indicator value calculated from the 2:35:00 PM bar can only be displayed 42 seconds later, when the tick bar closes. You indicator now has a lag, which was not the case for solution (1). You cannot have it all, you will either get non-equidistant bar spacing or a lag. For backtesting this can be avoided, if you primary bar series is a 1-tick series. In that case you are in the best of all worlds, but the result - a 1 tick series on your chart - is not exactly visually appealing.

The indicators can be found here:




2b) Here is an open code indicator, which I have published, which allows to calculate the exact opening range of a minute based period on a tick, range or volume chart. The indicators works, but I have recently developed a better approach to the problem. Nevertheless, you could have a look at the code, as it is a genuine multi-timeframe indicator.



3) It is also possible to calculate composite bars. For example, if you have a 5 min bar series, you can easily calculate indicators using an integer multiple of the 5 min bar period. You could produce a 10 min Stochastics, or a 35 min MACD.

Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
(login for full post details)
  #4 (permalink)
Europe
 
Experience: Beginner
Platform: NinjaTrader
 
Posts: 73 since Jun 2009
Thanks: 11 given, 53 received

FT,

thanks for your very detailed reply.

Shortly after posting i found your thread where you discuss your two indicators. These are really a great help, thanks again for sharing your work here.

I will keep experimenting using your VisualSMA with a period of 1 and the desired period as input for indicators, which should hopefully have the desired effect.

Started this thread Reply With Quote
The following user says Thank You to toulouse-lautrec for this post:


futures io Trading Community Platforms and Indicators NinjaTrader > custom timeframe


Last Updated on September 6, 2012


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

Journal Challenge w/Jigsaw

April
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts