Big Mike's Trading Forum
 

Go Back   Big Mike's Trading Forum

> Trading Forums > Platforms and Indicators > NinjaTrader


Notices
     

Coding Multi Time Frame (MTF) Indicators with NinjaTrader
Started:April 10th, 2011 (12:54 PM) by Fat Tails Views / Replies:60,844 / 390
Last Reply:April 18th, 2014 (05:36 AM) Attachments:153

Welcome to Big Mike's Trading Forum.

Welcome, Guest!

This forum was established to help traders by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

BMT is fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • 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, and we will never resell your private information.

-- Big Mike
     

Reply
 153  
 
Thread Tools Search this Thread

Coding Multi Time Frame (MTF) Indicators with NinjaTrader

Old September 4th, 2011, 04:55 PM   #141 (permalink)
Elite Member
Des Moines, Iowa
 
Trading Experience: Intermediate
Platform: Ninja, TOS
Broker/Data: AMP/CQG, TOS
Favorite Instrument: 6E, TF
 
madLyfe's Avatar
 
Posts: 1,222 since Feb 2011
Thanks: 4,934 given, 685 received

so fat tails, your saying we shouldnt be using visual mode but strategy mode?

Reply With Quote
     

Old September 5th, 2011, 08:47 AM   #142 (permalink)
Market Wizard
Berlin, Europe
 
Trading Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Instrument: Keyboard
 
Fat Tails's Avatar
 
Posts: 8,384 since Mar 2010
Thanks: 3,941 given, 19,601 received
Forum Reputation: Legendary

For Strategies use VisualSMA in StrategyMode


madLyfe View Post
so fat tails, your saying we shouldnt be using visual mode but strategy mode?


Equidistant Bar Spacing

The VisualMode replicates the SMA as it would be shown on a separate DataSeries. You could for example add a secondary DataSeries to your chart, set it to transparent (invisible) and then move it to the main panel. Then you can apply the default SMA to that DataSeries.

As an alternative you can apply the VisualSMA to the first DataSeries and specify the secondary bars via indicator panel.

The only visible difference should be:

-> the first chart will show unevenly spaced bars
-> the second chart has the bars evenly spaced


Repainting

If you set the default SMA which uses the second DataSeries to CalculateOnBarClose = false, it will repaint with every tick the distance between the last, current invisible candle and the prior candle. All indicators do repaint the indicator value for the developing bar in CalculateOnBarClose = false mode.

In VisualMode, the VisualSMA simply mimics this behaviour, but relative to the primary DataSeries the repainting can cover a distance of several bars. This repainting over several bars makes it unusable. when called by strategies or indicators.


StrategyMode

The StrategyMode does not repaint. The indicator can be used by other indicators and strategies in StrategyMode. However it will not produce any interpolation of datapoints, but you will see a step function.

Reply With Quote
     
The following 2 users say Thank You to Fat Tails for this post:
     

Old September 5th, 2011, 10:58 AM   #143 (permalink)
Market Wizard
Berlin, Europe
 
Trading Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Instrument: Keyboard
 
Fat Tails's Avatar
 
Posts: 8,384 since Mar 2010
Thanks: 3,941 given, 19,601 received
Forum Reputation: Legendary


Had a look at the VisualSMA as well. The chart below shows that compared to the original SMA it comes very close, but there is a minor lag. After all it needs a candle to be displayed. I will still further test its behaviour.

Attached Thumbnails
Coding Multi Time Frame (MTF) Indicators with NinjaTrader-6e-09-11-4-range-_-6e-09-11-10-range-05_09_2011.jpg  
Reply With Quote
     
The following 2 users say Thank You to Fat Tails for this post:
     

Old September 5th, 2011, 11:25 AM   #144 (permalink)
Market Wizard
Rechovot
 
Trading Experience: Advanced
Platform: NinjaTrader
Broker/Data: CQG
Favorite Instrument: Index and currency futures
 
perryg's Avatar
 
Posts: 1,638 since Jan 2010
Thanks: 449 given, 5,937 received
Forum Reputation: Legendary


Fat Tails View Post
Had a look at the VisualSMA as well. The chart below shows that compared to the original SMA it comes very close, but there is a minor lag. After all it needs a candle to be displayed. I will still further test its behaviour.

Hello @Fat Tails
I believe since my webinar and showing people the use of the VisualSMA, you have been queried with dozens of questions as to the accuracy of the indicator i.e. is it lagging by one bar or not and many other questions. First of all I apologize for creating all this fuss. In MHO I think that people did not understand the use of using a HTF indicator and how to read it. The use of a 10 or 8 range on a 4 range chart is to show the DIRECTION of the trend and no more. In your chart today you show that no matter if it lags or not, the TREND is the same, and that is the main idea. The decision making in my use of this setup will NOT change as can been seen from your charts.
Once again thank you for an excellent indicator, it is far more advanced than the usual way NT uses HTF on one chart. I owe you one !!!!!

Reply With Quote
     
The following 3 users say Thank You to perryg for this post:
     

Old September 5th, 2011, 12:09 PM   #145 (permalink)
Market Wizard
Berlin, Europe
 
Trading Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Instrument: Keyboard
 
Fat Tails's Avatar
 
Posts: 8,384 since Mar 2010
Thanks: 3,941 given, 19,601 received
Forum Reputation: Legendary

Current BMT User Poll

Should sim traders that pretend to trade cash be allowed on BMT?

 

perryg View Post
Hello @Fat Tails
I believe since my webinar and showing people the use of the VisualSMA, you have been queried with dozens of questions as to the accuracy of the indicator i.e. is it lagging by one bar or not and many other questions. First of all I apologize for creating all this fuss. In MHO I think that people did not understand the use of using a HTF indicator and how to read it. The use of a 10 or 8 range on a 4 range chart is to show the DIRECTION of the trend and no more. In your chart today you show that no matter if it lags or not, the TREND is the same, and that is the main idea. The decision making in my use of this setup will NOT change as can been seen from your charts.
Once again thank you for an excellent indicator, it is far more advanced than the usual way NT uses HTF on one chart. I owe you one !!!!!

@perryg : No problem, I am currently reviewing the indicator. It is a complex puece of code, so I may find ways to improve it. Will come back with the results.

Reply With Quote
     
The following 3 users say Thank You to Fat Tails for this post:
     

Old September 5th, 2011, 06:34 PM   #146 (permalink)
Elite Member
In the heat
 
Trading Experience: Intermediate
Platform: Ninja Trader
Favorite Instrument: CL
 
PandaWarrior's Avatar
 
Posts: 2,658 since Mar 2010
Thanks: 5,140 given, 9,885 received

Having an SMA from a five min chart on my range chart is outstanding, however, it appears to have stopped working today. Attached is a pic from my range chart with a 21visual SMA from a 5 min chart.

[screenshot]http://screencast.com/t/XQeuGtBT[/screenshot]....can someone tell me how to make my jing screenshots show up in the post. I thought this was the way but obviously I am wrong.

2011-09-05_1532 - aztrader9's library

Simplicity is the ultimate sophistication, Leonardo da Vinci

numquam cede

Reply With Quote
     

Old September 5th, 2011, 07:17 PM   #147 (permalink)
Elite Member
In the heat
 
Trading Experience: Intermediate
Platform: Ninja Trader
Favorite Instrument: CL
 
PandaWarrior's Avatar
 
Posts: 2,658 since Mar 2010
Thanks: 5,140 given, 9,885 received

Re started ninja, entirely new look to the charts. Not sure what happened there but it appears to be correct now.

2011-09-05_1617 - aztrader9's library

Simplicity is the ultimate sophistication, Leonardo da Vinci

numquam cede

Reply With Quote
     

Old September 5th, 2011, 07:30 PM   #148 (permalink)
Market Wizard
Berlin, Europe
 
Trading Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Instrument: Keyboard
 
Fat Tails's Avatar
 
Posts: 8,384 since Mar 2010
Thanks: 3,941 given, 19,601 received
Forum Reputation: Legendary


PandaWarrior View Post
Having an SMA from a five min chart on my range chart is outstanding, however, it appears to have stopped working today. Attached is a pic from my range chart with a 21visual SMA from a 5 min chart.

[screenshot]http://screencast.com/t/XQeuGtBT[/screenshot]....can someone tell me how to make my jing screenshots show up in the post. I thought this was the way but obviously I am wrong.

2011-09-05_1532 - aztrader9's library

I have no idea, why it stopped working. Could you please tell me

(1) whether your chart shows real-time data or historical data
(2) whether refreshing the chart via F5 changes anything
(3) whether the problem also occurs with conventional range bars (as opposed to RangeNoGap bars).

Reply With Quote
     

Old September 5th, 2011, 08:37 PM   #149 (permalink)
Elite Member
In the heat
 
Trading Experience: Intermediate
Platform: Ninja Trader
Favorite Instrument: CL
 
PandaWarrior's Avatar
 
Posts: 2,658 since Mar 2010
Thanks: 5,140 given, 9,885 received


Fat Tails View Post
I have no idea, why it stopped working. Could you please tell me

(1) whether your chart shows real-time data or historical data
(2) whether refreshing the chart via F5 changes anything
(3) whether the problem also occurs with conventional range bars (as opposed to RangeNoGap bars).

1) Real time
2) F5 does not APPEAR to change anything.
3) I will need to see about the RangeNoGap bars. I've only had them on the chart for two days. Previously used conventional range bars.

I will report any future abnormalities as I discover them.

Simplicity is the ultimate sophistication, Leonardo da Vinci

numquam cede

Reply With Quote
     
The following user says Thank You to PandaWarrior for this post:
     

Old September 6th, 2011, 12:50 PM   #150 (permalink)
Market Wizard
Berlin, Europe
 
Trading Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Instrument: Keyboard
 
Fat Tails's Avatar
 
Posts: 8,384 since Mar 2010
Thanks: 3,941 given, 19,601 received
Forum Reputation: Legendary

Indicator Update VisualSMA and VisualEMA



Braulio View Post
Fat Tails,

I'm using the latest version of the anaVisualSMA and today I noticed the following on my charts :

You can see on the attached pictures that the first one(TRADE#8) was taken yesterday while I was trading, and the second one was taken at the exact same spot today(after shutting down my computer and closing ninja).

The VisualSMA's look different but everything else is in place.

Thanks.

B

@Braulio: I have had a look at the VisualSMA and VisualEMA again. In VisualMode and real-time the indicator plotted in an inconsistent way, as there was a bug in the interpolation algorithm. I have now recoded that section of the indicator, and the tests which I have made suggest that the problem is solved.

The updated indicators are here:

https://www.bigmiketrading.com/free_downloads/ninjatrader-7/indicators/942-download.html?view
https://www.bigmiketrading.com/free_downloads/ninjatrader-7/indicators/939-download.html?view

The chart below shows the new version (blue) compared to the old version (red, dashed). Below is the SMA, which is directly calculated from 8 range bars (orange) for comparison.

Could you please check and confirm that it now works as expected.

Attached Thumbnails
Coding Multi Time Frame (MTF) Indicators with NinjaTrader-visualsma-real-time.jpg  
Reply With Quote
     
The following 5 users say Thank You to Fat Tails for this post:
     

Reply



Tags
123, 6 range, 6r, account, accurate, ai, algorithm, amazon, amp, analysis, anasupertrend, ati, automated, axis, bars, big mike, bot, calls, candlesticks, cd, ces, challenge, change, chart, charts, chartstyle, cl, close, cme, code, coding, color, colors, combination, compile, composite, condition, connection, consistency, contracts, control, convert, correlation, create, custom, daily, daily range, data, data series, database, day, demo, development, divergence, dll, doc, dog, dow, drastic, edge, el, ema, enter, entry, error, errors, es, european, event, event driven, feed, fibonacci, file, fill, filter, fix, formula, free, function, functions, future, fx, gap, gaps, gp, greater than, grid, group, high, historical, historical bars, historical data, horizontal, hybrid, improvement, indicator, indicators, initialize(), instance, instrument, instruments, interval, jma, kiss, lagging, last price, learn, learning, life, line, list, live, living, load, lot, love, low, mac, management, margin, market, market profile, master, median, mental, mind, ml, mode, moves, moving average, mtf, multiple, multiple_time_frames, names, new high, new indicator, news, ninja, ninjatrader, ninjatrader 7, not set, note, nt, nt7, object, object reference, onstartup, opacity, open, opening range, option, options, override, package, paint bars, parameter, parameters, peace, performance, period, perry, pivot, pivots, plan, plot, positions, practice, price, profit, profitable, program, purpose, puts, question, questions, range, range bar, range bars, range chart, ray, real time, rectangles, reliable, reload, renko, renko chart, repainting, replay, risk, rules, sample, save, script, scripts, series, session, settings, setup, signal, signals, sim, simple, slope, sma, small, software, speed, split, start, stop, stop loss, strategies, strategy, string, support, support and resistance, swap, ta, tax, technical, template, testing, thank you, tick, tick chart, tick charts, ticks, time, time and sales, time frames, time series, timeframe, trade, trader, traders, trades, trading, training, trend filter, type, update, values, variable, volatility, volume, vwap, windows
     

Big Mike's Trading Forum > Trading Forums > Platforms and Indicators > NinjaTrader > Coding Multi Time Frame (MTF) Indicators with NinjaTrader

Thread Tools Search this Thread
Search this Thread:

Advanced Search


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


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

Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
Copyright © 2014 by Big Mike Trading. 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 2014-04-20 in 0.15 seconds with 20 queries on atlantis via your IP 54.196.57.4