Jons MTZ debacle - NinjaTrader Programming | futures trading

Go Back

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming

Jons MTZ debacle
Started:July 8th, 2010 (10:53 AM) by Trader.Jon Views / Replies:816 / 2
Last Reply:July 8th, 2010 (11:33 AM) Attachments:1

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

Jons MTZ debacle

Old July 8th, 2010, 10:53 AM   #1 (permalink)
Elite Member
Near the BEuTiFULL Horse Shoe
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: MBTrading Dukascopy ZenFire
Favorite Futures: $EURUSD when it is trending
Trader.Jon's Avatar
Posts: 500 since Jul 2009
Thanks: 401 given, 172 received

Jons MTZ debacle

Good day to everybody!

This was originally shElderImpulse strategy (The Elder Impulse System) from the NT 6.5 free download section. I am trying to make a framework for MultiTimeFrame and MultipleTimeZone and backround colors to use with various indicators.

Renamed to aMTF_MTZones_colors2. The strategy will compile correctly, but the backround colors (and I am guessing those higher time frame calculations as well?) dont display except for the the inputs assigned to the first timezone. I tried using '0' for start and end of the first timezone and the strategy shows color bands for all 24 hours.

This shows how the original code was:::

#region Variables
        // Wizard generated variables
int _tradeTimeBegin         0// Default setting for TradeTimeBegin1
private int _tradeTimeEnd         0// Default setting for TradeTimeEnd1
// User defined variables (add any user defined variables below)

This shows how I modified the code:::

#region Variables
        // Wizard generated variables
int _tradeTimeBegin1         0230// Default setting for TradeTimeBegin1
private int _tradeTimeEnd1         0530// Default setting for TradeTimeEnd1
private int _tradeTimeBegin2         0950// Default setting for TradeTimeBegin1
private int _tradeTimeEnd2         1110// Default setting for TradeTimeEnd1
private int _tradeTimeBegin3         1310// Default setting for TradeTimeBegin1
private int _tradeTimeEnd3         1530// Default setting for TradeTimeEnd1
// User defined variables (add any user defined variables below)

I changed the variables to have multiple time zones for trades, and also made other changes in the code at the ""Properties"" and ""private bool TimeToTrade"" to add additional lines for the timezones I added. I cant see where else in the code changes need to be made to activate the other time zones.

The code only uses EMA and MACD so it imports without any additional indies.

I would appreciate feedback and assist to resolve the issue. I hope this will be useful for others in their code as well.


Attached Files
Register to download File Type: zip (5.9 KB, 9 views)

Last edited by sam028; July 8th, 2010 at 11:28 AM. Reason: add coding tags
Reply With Quote

Old July 8th, 2010, 10:53 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 July 8th, 2010, 11:33 AM   #3 (permalink)
Administrator: Retired Backtester
Rennes France
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: IB/Kinetick
Favorite Futures: Futures
sam028's Avatar
Posts: 3,184 since Jun 2009
Thanks: 3,427 given, 3,726 received

I didn't open the source, just a remark:
- Integer variables should be used to manipulate integer values.
- DateTime type has been created for manipulate date and time, it's much more easy/reliable to use this !!!

Usually in trading, those who know don't talk, and those who talk don't know. (Al Brooks)
success requires no deodorant! (Sun Tzu)
Reply With Quote
The following user says Thank You to sam028 for this post:

Reply > Futures Trading, News, Charts and Platforms > Platforms and Indicators > NinjaTrader > NinjaTrader Programming > Jons MTZ debacle

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

All times are GMT -4. The time now is 07:53 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-24 in 0.08 seconds with 19 queries on phoenix via your IP