Coding Multi Time Frame (MTF) Indicators with NinjaTrader - NinjaTrader | futures io social day trading
futures io futures trading


Coding Multi Time Frame (MTF) Indicators with NinjaTrader
Updated: Views / Replies:103,498 / 411
Created: by Fat Tails Attachments:161

Welcome to futures io.

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

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

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

Reply
 161  
 
Thread Tools Search this Thread
 

Coding Multi Time Frame (MTF) Indicators with NinjaTrader

  #161 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,602 received
Forum Reputation: Legendary


Braulio View Post
Here's how I approached the testing scenario:

1. The first thing I wanted to do was compare the charts I've posted here to see how the historical/real-time data issue was. So I opened a new chart(historical) with the new version of the anaVisualSMA and took a picture right at the same place. The picture is attached and it's called "Testing 05-09-2011". From this first approach I can assume that it still behaves differently on historical and real-time data.

The real-time chart from September 5 was created with the old version of VisualSMA. You now compared the new version on historical data with the old version on real-time data. However, what was changed, is how the new version works on real-time data. So the comparison has no meaning.


Braulio View Post
2. Also wanted to have real-time data on a chart from today and open up a new chart (historical) to compare it with the real-time data of just today. You can see the pictures "Today - Real-time" and "Today - Historical", they do not match.

Are you sure that you uninstalled the old assembly and replaced it with the new one. The real-time behavior of the indicator suggests that it is the old version. Also you have again hidden all the settings, please display them on the chart!


Braulio View Post
3. Now I can't compare the old with the new version as Ninja won't let me have both installed, but to test the improved precision of the VisualSMA's I did just what you did Fat Tails, placed a chart with 2 dataseries in 4Range and 8Range. On top we have the VisualSMA and on the bottom panel the SMA that should be mimicked. I agree that the problem appears to be solved. This is just a first test and I would like to continue and monitor its behavior so that we can get a better confirmation.
B

Here you have confused yourself. The top indicator mimics an SMA(1) on an 8-range chart. But the bottom indicator is a SMA(1) calculated from a 4-range bar series, which you have placed on the false panel. They cannot match! If you set the VisualSMA(1) to 8-range, please compare it to an SMA on a 8-range chart which is calculated from that 8-range chart.

By the way, I appreciate your tests. It is a great help, if somebody else has an in-depth look at the indicators!

Reply With Quote
The following 2 users say Thank You to Fat Tails for this post:
 
  #162 (permalink)
Elite Member
Portugal
 
Futures Experience: Beginner
Platform: Ninjatrader, Multicharts
Broker/Data: Amp Futures/Zen-Fire
Favorite Futures: ES, 6E
 
Braulio's Avatar
 
Posts: 230 since Aug 2009
Thanks: 404 given, 216 received

New test

This wheelchair user test subject made some mistakes. Glad I have an excellent doctor! Now I only need a hot nurse

#1...Yesterday I removed the previous VisualSMA assembly and uploaded the new one into ninja without restarting it...didn't know I should have done that. Think that's what might have caused the charts to look as if nothing had changed.

#2...Ran a new test the same way as the previous one. They now seem to match perfectly. I would really like to understand why that is (if that's not asking for too much).

#3...Yesterday I actually inserted the SMA on the first panel and after realizing that mistake dragged it to the lower one without changing its settings...Nurse!!
But now I went a little bit further. We can see from the picture "Tops + Bottoms" that the VisualSMA matches perfectly with the SMA on the bottom panel and that's a picture taken on the 06-09-2011 where I made a trade. You can see that trade on the "TRADE#9" picture (The 8range VisualSMA is the hot pink dashed line) and compare the new version with the old one. Yes, they do not match at all (I've also attached the template I used for the charts).

Final thoughts : The new version plots completely different from the previous one in real-time, only now it is a perfect match with the corresponding SMA. This means that now we can look back on our charts and backtest for setups/entries, the problem no longer exists.

Thank you Fat Tails.

Attached Thumbnails
Coding Multi Time Frame (MTF) Indicators with NinjaTrader-today-historical.jpg   Coding Multi Time Frame (MTF) Indicators with NinjaTrader-today-real-time.jpg   Coding Multi Time Frame (MTF) Indicators with NinjaTrader-tops-bottoms.jpg   Coding Multi Time Frame (MTF) Indicators with NinjaTrader-trade-9.jpg  
Attached Files
Register to download File Type: xml TESTING.xml (47.8 KB, 14 views)
Reply With Quote
The following 2 users say Thank You to Braulio for this post:
 
  #163 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,602 received
Forum Reputation: Legendary



Braulio View Post
Final thoughts : The new version plots completely different from the previous one in real-time, only now it is a perfect match with the corresponding SMA. This means that now we can look back on our charts and backtest for setups/entries, the problem no longer exists.

Anyhow, you have discovered a bug and I have removed it. Best of all worlds.

If you want to use the VisualSMA with strategies or for proper backtesting of your P&L, then you need to stick to the StrategyMode.

Reply With Quote
The following 2 users say Thank You to Fat Tails for this post:
 
  #164 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,357 given, 83,237 received

Harry, can you enlighten be regarding post 159? I'm just curious and want to understand.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #165 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,602 received
Forum Reputation: Legendary


Big Mike View Post
Harry, can you enlighten be regarding post 159? I'm just curious and want to understand.

Mike

Sorry, I had not noticed that post, as there were several posts afterwards.

It is possible to transform the VisualSMA and the VisualEMA into a single indicator. It is also possible to add other moving average types.

However, I did not want to go too fast, because it was an experiment. The latest version of VisualSMA is actually release 8, and it is probably not the last one. The indicator already has over 500 lines of code, which is a lot for an SMA. Hot subjects are differences between historical and real-time data, taking into account session begin and session end, different timestamps on tick-based and minute-based charts, repainting to compensate for lag, different algorithms for interpolation on equidistant and non-equidistant charts, dependence of algorithms on underlying bar types for price projections.

Once the VisualSMA is fine, I will proceed to the next step. But as you notice, I have just removed a bug yesterday. So let us first see, whether there is more feedback.

In the end, the concept can be applied to any indicator.

Reply With Quote
The following 2 users say Thank You to Fat Tails for this post:
 
  #166 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,357 given, 83,237 received

Thanks, that is also why I was confused that you are maintaining two separate code bases instead of merging into one, seems easier that way

Good job as always.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #167 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,602 received
Forum Reputation: Legendary


Big Mike View Post
Thanks, that is also why I was confused that you are maintaining two separate code bases instead of merging into one, seems easier that way

Good job as always.

Mike

Was easier to create two indicators. Took the VisualSMA and substituted "SMA" for "EMA". This was ways faster than to add an enum, 30 lines of code and a property. I am sometimes lazy.

Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
  #168 (permalink)
Elite Member
Honolulu, Hawaii
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: ATC/TT, AMP/Zen-Fire, AMP/CQG
Favorite Futures: TF
 
bluemele's Avatar
 
Posts: 2,547 since Jun 2010
Thanks: 3,806 given, 2,826 received


Fat Tails View Post
Was easier to create two indicators. Took the VisualSMA and substituted "SMA" for "EMA". This was ways faster than to add an enum, 30 lines of code and a property. I am sometimes lazy.

Dude, you are about the unlaziest person I have met through the internet.

Reply With Quote
The following 3 users say Thank You to bluemele for this post:
 
  #169 (permalink)
Elite Member
Des Moines, Iowa
 
Futures Experience: None
Platform: Ninja, TOS
Broker/Data: AMP/CQG, TOS
Favorite Futures: CL, TF, GC
 
madLyfe's Avatar
 
Posts: 1,641 since Feb 2011
Thanks: 9,217 given, 1,011 received


bluemele View Post
Dude, you are about the unlaziest person I have met through the internet.

i have to tatally agree w u! thanks to ya fatty!

dont believe anything you hear and only half of what you see

¯\_(ツ)_/¯

(╯°□°)╯︵ ┻━┻
Reply With Quote
 
  #170 (permalink)
Elite Member
Portugal
 
Futures Experience: Beginner
Platform: Ninjatrader, Multicharts
Broker/Data: Amp Futures/Zen-Fire
Favorite Futures: ES, 6E
 
Braulio's Avatar
 
Posts: 230 since Aug 2009
Thanks: 404 given, 216 received

Tick data


I think I may have found something else...

This morning Ninja kept giving me the following error message :

09-09-2011 07:29:34 Default Connection to NinjaTrader historical market data server lost: The process cannot access the file 'C:\Users\BP\Documents\NinjaTrader 7\db\tick\6E 09-11\201109090800.Last.ntd' because it is being used by another process.

I logged on and off, restarted Ninja and it the error message kept popping up everytime I tried to connect but then I noticed something : all the windows (I have 13 chart windows open) were being updated with data (I can see the candles and all the indicators, etc) EXCEPT the charts that have VisualSMA's...they were blank. Because that got me a little suspicious, I decided to close all the charts that have VisualSMA's and restart Ninja. Now the error message is gone.
After a successful connection, I re-opened my charts with VisualSMA's and everything seems fine.

Might there be an issue with the VisualSMA's accessing tick data on these files?

Reply With Quote

Reply



futures io > > > > Coding Multi Time Frame (MTF) Indicators with NinjaTrader

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi Time Frame Strategy Cancellation jthom NinjaTrader Programming 2 October 9th, 2014 12:00 PM
Close bar recognization in multi time frame strategy pinto552 NinjaTrader Programming 6 September 6th, 2011 10:07 AM
Multi-time frame strategy with periods of different size pequemec NinjaTrader Programming 2 February 24th, 2010 01:41 PM
visual multi-time frame scoring system. benbrooke Traders Hideout 1 October 4th, 2009 06:49 PM
Multi Volume/Time Frame Trading wh The Elite Circle 7 September 15th, 2009 05:55 PM


All times are GMT -4. The time now is 01:01 PM.

Copyright © 2017 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
Page generated 2017-12-18 in 0.15 seconds with 20 queries on phoenix via your IP 54.196.201.241