MTF Indicators - EasyLanguage Programming | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > TradeStation > EasyLanguage Programming

MTF Indicators
Started:November 8th, 2010 (12:41 AM) by diverdan Views / Replies:1,922 / 3
Last Reply:November 13th, 2010 (05:23 PM) Attachments:0

Welcome to

Welcome, Guest!

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

We are 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

Thread Tools Search this Thread

MTF Indicators

Old November 8th, 2010, 12:41 AM   #1 (permalink)
Elite Member
Futures Experience: Beginner
Platform: Multicharts, R
Favorite Futures: EUR / USD
Posts: 185 since Feb 2010
Thanks: 106 given, 96 received

MTF Indicators


I have created a MTF signal in MC, one timeframe (for trend) is the daily chart and the other for trading is 60 minute chart.

I have defined the trend based upon the daily chart using:
if (DayEma[0] > DayEma[1]) then
else if (DayEma[0] < DayEma[1]) then
= -1
else if (DayEma[0] = DayEma[1]) then trend 0
else trend trend
However this only worked for one hour bar in the day i.e. when the session ended. Otherwise DayEma[0] = DayEma[1].

I sort of solved the problem by calculating the hour bar to reference back to the end of the session to get the correct daily EMA value:

if (DayEma[0] > DayEma[Mod(BarNumber -1,  24)]) then
else if (DayEma[0] < DayEma[Mod(BarNumber -1,  24)]) then
= -1
else if (DayEma[0] = DayEma[Mod(BarNumber -1,  24)]) then trend 0
else trend trend
This would work for time based trade charts but not any exotic bar types (e.g. Range).

Does anyone know how to solve this elegantly?



Reply With Quote

Old November 8th, 2010, 12:41 AM   #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.


Old November 8th, 2010, 12:48 AM   #3 (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: 45,432 since Jun 2009
Thanks: 28,836 given, 79,558 received

I just use a

if date <> date[1
block in my code for processing new day events. It may work here too, I'm not 100% sure what you are trying to do.


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.
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

Old November 13th, 2010, 05:23 PM   #4 (permalink)
Trading Apprentice
St. Petersburg, Russia
Futures Experience: Advanced
Platform: Multicharts
Favorite Futures: spot fx, currency futures, GC, ES
Posts: 30 since Nov 2010
Thanks: 6 given, 17 received

I think I realize the root of the problem. When you use any indicator from a higher timerame on a lower one you have equal values for all bars except the first corresponding to the higher timeframe bar. And you seem to want the condition like ma1 > ma2 be true over the whole lower timeframe span (day in your example). If my guess is true then it's very easy to implement. You simply write:

ma1 = xaverage(close of data2, N);
condition1 = ma1 of data2 > ma1[1] of data2;

In this case the condition should be true during the whole day on the lower timeframe.

Hope this helps. If this is not what you're looking for please ask for more, I'll try to help.

Reply With Quote

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > TradeStation > EasyLanguage Programming > MTF Indicators

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

An Afternoon with FIO trader bobwest

Elite only

NinjaTrader 8: Programming Profitable Trading Edges w/Scott Hodson

Elite only

Anthony Drager: Executing on Intermarket Correlations & Order Flow, Part 2

Elite only

Adam Grimes: Five critically important keys to professional trading

Elite only

Machine Learning Concepts w/FIO member NJAMC

Elite only

MarketDelta Cloud Platform: Announcing new mobile features

Dec 1

NinjaTrader 8: Features and Enhancements

Dec 6

Similar Threads
Thread Thread Starter Forum Replies Last Post
Coding Multi Time Frame (MTF) Indicators with NinjaTrader Fat Tails NinjaTrader 411 June 28th, 2016 07:34 AM
MTF WMA of RSI code help gever17 NinjaTrader Programming 5 March 31st, 2011 05:16 PM
Trying a MTF version of TSSuperTrend Trader.Jon NinjaTrader Programming 3 March 7th, 2011 08:33 AM
MTF Coding Question togier NinjaTrader Programming 2 December 7th, 2010 12:35 AM
My First MTF Strategy .. need some minor error fixes Trader.Jon The Elite Circle 4 May 14th, 2010 08:58 PM

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

Copyright © 2016 by 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 2016-10-22 in 0.09 seconds with 20 queries on phoenix via your IP