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,485 / 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

  #251 (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


Rocketdog View Post
The Visual SMA's are in panel two, cyan and red dashed lines. The new Visual SMA MTF didn't plot as smoothly.

You should compare the old VisualSMA against the new VisualSMA and you will find that they are very similar, except that the lag was reduced.

Below is a comparison (on historical data) of the VisualSMA and the NewVisual SMA. If you look at the data box you will see that the new VisualSMA leads the old VisualSMA in an upmove.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Reply With Quote
The following 4 users say Thank You to Fat Tails for this post:
 
  #252 (permalink)
Elite Member
Newcastle Australia
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: 6E
 
Rocketdog's Avatar
 
Posts: 60 since Jun 2011
Thanks: 98 given, 62 received


Fat Tails View Post
You should compare the old VisualSMA against the new VisualSMA and you will find that they are very similar, except that the lag was reduced.

Below is a comparison (on historical data) of the VisualSMA and the NewVisual SMA. If you look at the data box you will see that the new VisualSMA leads the old VisualSMA in an upmove.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).



I can't explain why but the old Visual SMA works for me. Maybe it's a better fit with the RenkoHybrid bars. I've been trading my live account for part of October and all of November with an almost 100% success rate. I really don't want to change anything. I want to keep the same set-up and hopefully become more confident with what I have.

Reply With Quote
The following user says Thank You to Rocketdog for this post:
 
  #253 (permalink)
Elite Member
California, USA
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: 6E
 
Posts: 7 since Feb 2010
Thanks: 137 given, 21 received



Rocketdog View Post
I can't explain why but the old Visual SMA works for me. Maybe it's a better fit with the RenkoHybrid bars. I've been trading my live account for part of October and all of November with an almost 100% success rate. I really don't want to change anything. I want to keep the same set-up and hopefully become more confident with what I have.

Rocketdog,

If somebody hasn't provided it already, I think this is what you're looking for - the 'ana' indicator prior to Fat Tails' latest Visual SMA.

-Dexter

Attached Files
Register to download File Type: zip anaShadedMAs.zip (23.6 KB, 80 views)
Reply With Quote
The following user says Thank You to dexter for this post:
 
  #254 (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


dexter View Post
Rocketdog,

If somebody hasn't provided it already, I think this is what you're looking for - the 'ana' indicator prior to Fat Tails' latest Visual SMA.

-Dexter

Sorry the anaShadedMAs has nothing to do with the Visual SMA, it is not a multi-timeframe indicator but a simple set of two moving averages.

I will not make the old version of the VisualSMA available to the public again, because the newer version is more accurate, more robust and much faster to load. Also, I have not seen a single argument so far in favor of the old indicator.

If anybody wants an older version of the VisualSMA, please send me a private message. I will then make it available, but would like to understand the reasons, why somebody would prefer it to the new version.

Reply With Quote
The following 2 users say Thank You to Fat Tails for this post:
 
  #255 (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


madelynnjohnson View Post
Rocketdog,

Can you still select the indicator when you have a chart up or has that gone as well? I'm not quite sure why I can still select the anaVisual SMA from a list of indicators when I have a chart up and not have it show in the master indicator list when you try to edit an indicator. Anyone out there have any ideas?

Madelynn

@madelynnjohnson:

The indicator is distributed as a protected and compiled assembly. All compiled indicators will not show in the master list and cannot be edited.

Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
  #256 (permalink)
Elite Member
Rio de Janeiro
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire, IB
Favorite Futures: Equity & Futures
 
prisonbreaker82's Avatar
 
Posts: 312 since Jun 2010
Thanks: 57 given, 141 received


Fat Tails View Post
@prisonbreaker82: I can save the template here. Do not really know, what causes your problem. If you wish contact me via private message, so that I can have a look at your chart template.

It works great now with the final version installed. strange... Does not matter as I can now save my templates..

thanks

Reply With Quote
The following user says Thank You to prisonbreaker82 for this post:
 
  #257 (permalink)
Membership Temporarily Revoked
NYC
 
Futures Experience: Intermediate
Platform: Ninjatrader
Broker/Data: Interactive Brokers
Favorite Futures: forex
 
Posts: 38 since Aug 2011
Thanks: 9 given, 25 received

Visual EMA core engine:
-----------------------------
protected override void OnBarUpdate()
{
if (BarsInProgress == 1)
{
double xEMA = (CurrentBars[1] == 0 ? Inputs[1][0] : Inputs[1][0] * (2.0 / (1 + Period)) + (1 - (2.0 / (1 + Period))) * Value[1]);
return;
}
if (BarsInProgress == 0)
{
Value.Set(xEMA);
}
return;
}
------------------------------------------------------------------------------------------
VisualSMA core:
------------------------------------------------------------------------------------------
protected override void OnBarUpdate()
{

if (BarsInProgress == 1)
{
if (CurrentBars[1] == 0)
xSMA = (Inputs[1][0]);
else
{
double last = Value[1] * Math.Min(CurrentBars[1], Period);

if (CurrentBars[1] >= Period)
xSMA = ((last + Inputs[1][0] - Inputs[1][Period]) / Math.Min(CurrentBars[1], Period));
else
xSMA = ((last + Inputs[1][0]) / (Math.Min(CurrentBars[1], Period) + 1));
}
return;
}
if (BarsInProgress == 0)
{
Value.Set(xSMA);
}
return;

}

Reply With Quote
The following user says Thank You to BankRobberNT for this post:
 
  #258 (permalink)
Elite Member
Boston
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: Crude
 
PHXtrader's Avatar
 
Posts: 84 since Apr 2011
Thanks: 48 given, 76 received

Fat Tails ,


Your new versions of your indicators are Great! I use them extensively on many of my charts and the load times have been cut down significantly.

I use 4 of your ema's and 4 of your sma's on one chart which leads me to a question or maybe a suggestion for a rainy day addition. (if you think its a useful idea of coarse)

Is it possible to add a user defined text field that would display on the MA line itself or maybe the hard right edge of the chart where the MA line ends. That way you could label each line for quick ref. (5R or 5min or 5T ect.)

It's just hard to keep track of which line is which when you have 8 different ones on the same chart.

Thanks

Reply With Quote
 
  #259 (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


PHXtrader View Post
Fat Tails ,


Your new versions of your indicators are Great! I use them extensively on many of my charts and the load times have been cut down significantly.

I use 4 of your ema's and 4 of your sma's on one chart which leads me to a question or maybe a suggestion for a rainy day addition. (if you think its a useful idea of coarse)

Is it possible to add a user defined text field that would display on the MA line itself or maybe the hard right edge of the chart where the MA line ends. That way you could label each line for quick ref. (5R or 5min or 5T ect.)

It's just hard to keep track of which line is which when you have 8 different ones on the same chart.

Thanks

I could add labels, or alternatively you could reduce the number of indicator that you use.

Do you really think that you get an advantage by using 8 of them on a single chart ?

Reply With Quote
 
  #260 (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



grofzr View Post
Visual EMA core engine:
-----------------------------
protected override void OnBarUpdate()
{
if (BarsInProgress == 1)
{
double xEMA = (CurrentBars[1] == 0 ? Inputs[1][0] : Inputs[1][0] * (2.0 / (1 + Period)) + (1 - (2.0 / (1 + Period))) * Value[1]);
return;
}
if (BarsInProgress == 0)
{
Value.Set(xEMA);
}
return;
}

The code can be used for a strategy, however - even if compared with the strategy mode of the VisualEMA - it is quite a bit different.

Accuracy on Backtests:

I will only compare it to the strategy mode. The strategy mode of the VisualEMA is specificly designed for use with historical data, and has the lag eliminated as much as possible, without repainting. On the chart below you will see that the real VisualEMA leads the indicator which was coded as above by one bar. This increases the accuracy of any backtest.

The VisualMode is even more accurate, but it repaints over the interpolation period. It should not be compared to the code snippet above. The same applies to the One-Tick-Correction mode.

CalculateOnBarClose = false:

Again the VisualEMA can be used in CalculateOnBarClose = false mode in strategy mode. There is a small lag for the first bars after the transition from historical to real-time data, but this is the price to be paid for the lag reduction on historical data. You cannot have both. The yellow indicator which follows the code above, cannot be easily used in CalculateOnBarClose = false mode, as it will neither produce a step function nor an interpolated indicator.

Attached Thumbnails
Coding Multi Time Frame (MTF) Indicators with NinjaTrader-es-12-11-1-min-22_11_2011.jpg  
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 05:00 AM.

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.20 seconds with 20 queries on phoenix via your IP 23.22.136.56