NexusFi: Find Your Edge


Home Menu

 





Jons MTZ debacle


Discussion in NinjaTrader

Updated
    1. trending_up 3,174 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 1 attachments




 
Search this Thread
  #1 (permalink)
 
Trader.Jon's Avatar
 Trader.Jon 
Near the BEuTiFULL Horse Shoe
 
Experience: Beginner
Platform: NinjaTrader
Broker: MBTrading Dukascopy ZenFire
Trading: $EURUSD when it is trending
Posts: 473 since Jul 2009
Thanks Given: 401
Thanks Received: 184

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

-------------------------------------------
 
Code
                            
{
        
#region Variables
        // Wizard generated variables
...
        private 
int _tradeTimeBegin         = 0; // Default setting for TradeTimeBegin1
        
private int _tradeTimeEnd         = 0; // Default setting for TradeTimeEnd1
...
 
// User defined variables (add any user defined variables below)
        #endregion 
-----------------------------------------

This shows how I modified the code:::

------------------------------------------
 
Code
                            
{
        
#region Variables
        // Wizard generated variables
...
        private 
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)
        #endregion 
------------------------------------

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.

Regards,
Trader.Jon


Attached Files
Elite Membership required to download: Jons_MTZ.zip
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
requesting .nrd replay files from 2026 spy and qqq
The Elite Circle
Bitcoin’s 2022 low, 2025 high and 2026 low so far arou …
Cryptocurrency
My Rant with AMP Futures
Trading Reviews and Vendors
Building a free browser DOM/SMC simulator - need some ad …
Platforms and Indicators
AI for Traders — Agents, Memory, Tools & Real-Worl …
Elite Quantitative GenAI/LLM
 
  #3 (permalink)
 
sam028's Avatar
 sam028 
Site Administrator
 
Posts: 3,779 since Jun 2009
Thanks Given: 3,840
Thanks Received: 4,709


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


Success requires no deodorant! (Sun Tzu)
Reply With Quote
Thanked by:




Last Updated on July 8, 2010


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts