NexusFi: Find Your Edge


Home Menu

 





Coding Multi Time Frame (MTF) Indicators with NinjaTrader


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 180 posts (562 thanks)
    2. looks_two Zondor with 19 posts (29 thanks)
    3. looks_3 madLyfe with 16 posts (10 thanks)
    4. looks_4 BankRobberNT with 14 posts (16 thanks)
      Best Posters
    1. looks_one gomi with 3.7 thanks per post
    2. looks_two Fat Tails with 3.1 thanks per post
    3. looks_3 Zondor with 1.5 thanks per post
    4. looks_4 BankRobberNT with 1.1 thanks per post
    1. trending_up 393,787 views
    2. thumb_up 743 thanks given
    3. group 87 followers
    1. forum 424 posts
    2. attach_file 166 attachments




 
Search this Thread
  #351 (permalink)
 
lolu's Avatar
 lolu 
Lagos, Nigeria
 
Experience: Intermediate
Platform: NinjaTrader, SierraChart
Trading: Euro Currency & Oil
Frequency: Daily
Duration: Hours
Posts: 2,555 since Jun 2009
Thanks Given: 1,050
Thanks Received: 1,679


ThatManFromTexas View Post
@lolu

@plethora posted her chart template earlier... ask her to post it again... only this time ask her to post the indicators in a zip with it....

@TMFT,

Could you kindly direct me to her chart template link ?

Lolu


Visit my NexusFi Trade Journal Reply With Quote

Can you help answer these questions
from other members on NexusFi?
The Backwardation Signal: How the CL Futures Curve Tells …
Commodities
Iran Airspace Collapses 18 Points to 15.5% While Hormuz …
Prediction Markets & Event Contracts
Iran Peace Expired NO: Ceasefire on Life Support, OPEC a …
Prediction Markets & Event Contracts
Iran War Prediction Markets: Ceasefire 16%, Ground Invas …
Prediction Markets & Event Contracts
US Prop Firms Race Inside the CFTC Perimeter -- Tradeify …
Funded Trading Evaluation Firms
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
21 thanks
2026 Jlab journal
10 thanks
Trying to learn Volume and price action correlation
8 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Hello Im new here
5 thanks
  #352 (permalink)
 
ThatManFromTexas's Avatar
 ThatManFromTexas 
Houston,Tx
 
Experience: Advanced
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire
Trading: TF
Posts: 2,265 since Feb 2010
Thanks Given: 1,206
Thanks Received: 4,360


lolu View Post
@TMFT,

Could you kindly direct me to her chart template link ?

Lolu

@lolu


I'm just a simple man trading a simple plan.

My daddy always said, "Every day above ground is a good day!"
Reply With Quote
  #353 (permalink)
 
lolu's Avatar
 lolu 
Lagos, Nigeria
 
Experience: Intermediate
Platform: NinjaTrader, SierraChart
Trading: Euro Currency & Oil
Frequency: Daily
Duration: Hours
Posts: 2,555 since Jun 2009
Thanks Given: 1,050
Thanks Received: 1,679



ThatManFromTexas View Post
@lolu


@TMFT,

This template is different from that on the screenshot in post # 343.

Lolu


Visit my NexusFi Trade Journal Reply With Quote
  #354 (permalink)
 
ThatManFromTexas's Avatar
 ThatManFromTexas 
Houston,Tx
 
Experience: Advanced
Platform: NinjaTrader
Broker: Mirus Futures/Zen-Fire
Trading: TF
Posts: 2,265 since Feb 2010
Thanks Given: 1,206
Thanks Received: 4,360


lolu View Post
@TMFT,

This template is different from that on the screenshot in post # 343.

Lolu

@lolu

Sorry about that.... try pm'ing @plethora


I'm just a simple man trading a simple plan.

My daddy always said, "Every day above ground is a good day!"
Reply With Quote
  #355 (permalink)
 
plethora's Avatar
 plethora 
Los Angeles, CA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Rithmic
Trading: GC
Posts: 629 since Dec 2010
Thanks Given: 1,174
Thanks Received: 425


Fat Tails View Post
@plethora: I very much hope that it was @ThatManFromTexas who has coded them and not me. .

I was in a rush and did not express myself clearly. I didn’t mean the indicator didn’t work properly – I meant I don’t use the indicator properly or feel that I was using it correctly.

I thought I read in this thread that the VisualSMA/EMA does not work on a tick chart. I don't understand if just applying the 30- or 60-minute VisualEma to my tick-chart is sufficient, or there is something more involved. What I also meant is that it seemed to work unbelievably well by just applying it simply to my chart. But I still think I did something wrong but don't know what. And, is it possible to show two tick data series on one chart and how? Non-equidistant spacing is fine.


Fat Tails View Post
The VisualSMA and VisualEMA should work correctly. Why do you think that they don't work? With a 30 min setting, the VisualSMA produces one signal every 30 minutes. If you put that on a tick chart,
there will be lots of new values during the night session, although there are only a few ticks. This means that the VisualSMA will approach price in a quick movement, which can be seen on the chart.

Fat Tails, did I put the VisualSMA on my chart correctly?


Reply With Quote
  #356 (permalink)
 
plethora's Avatar
 plethora 
Los Angeles, CA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Rithmic
Trading: GC
Posts: 629 since Dec 2010
Thanks Given: 1,174
Thanks Received: 425


ThatManFromTexas View Post
@Fat Tails

I think @plethora was being facetious since the 2 trades were profitable.... in which case... yes it was because of an indie I wrote ....

Ding, ding, ding. We have a winner here. This is exactly what I thought.


Reply With Quote
  #357 (permalink)
 
plethora's Avatar
 plethora 
Los Angeles, CA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Rithmic
Trading: GC
Posts: 629 since Dec 2010
Thanks Given: 1,174
Thanks Received: 425

Lolu, I'll send you my template if you continue nudging TMFT to complete the cockpit project. I thought TMFT's disclosure that he had a weakness for bling meant Prometheus was going to get a second life.


Reply With Quote
  #358 (permalink)
 
sudhirc's Avatar
 sudhirc 
detroit,mi
sc
 
Experience: Intermediate
Platform: NT
Broker: NT
Trading: ES
Frequency: Every few months
Duration: Hours
Posts: 417 since Sep 2011
Thanks Given: 1,709
Thanks Received: 473

@Fat Tails

Hi Guys,

I will explain what i'm trying to do and let me know whether it can be done with VisuaSMA?

What i did was called VisualSMA on to a script like the following
VisualSMA(30,false,false,Visual,Second,89,Close):-Basically calling in the value of 89SMA from a 30 second chart to a HTF chart. But when compiling it is giving me couple of errors.
1). The name Visual does not exist in the current context
2). The name Second does nto exist in the current context.

When i typed on to the script VisualSMA(............. it gave options on what to plug in (please see attached)



Can this be done? if it can be what should i plug for the following
VisualSMaCalcModethisCalcMode (i typed Visual in here)
VisualSMAPriceTypethisPriceType (i typed Close in here)

Thank you for your help,
CS.


Reply With Quote
  #359 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Interactive Brokers
Trading: Futures & Stocks
Posts: 9,887 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,114


sudhirc View Post
@Fat Tails

Hi Guys,

I will explain what i'm trying to do and let me know whether it can be done with VisuaSMA?

What i did was called VisualSMA on to a script like the following
VisualSMA(30,false,false,Visual,Second,89,Close):-Basically calling in the value of 89SMA from a 30 second chart to a HTF chart. But when compiling it is giving me couple of errors.
1). The name Visual does not exist in the current context
2). The name Second does nto exist in the current context.

When i typed on to the script VisualSMA(............. it gave options on what to plug in (please see attached)

Can this be done? if it can be what should i plug for the following
VisualSMaCalcModethisCalcMode (i typed Visual in here)
VisualSMAPriceTypethisPriceType (i typed Close in here)

Thank you for your help,
CS.



@sudhirc: There are ways to access the indicator, but you need to follow a few rules.


IN visual mode the indicator repaints back to the last node

In visual mode the VisualSMA uses a linear interpolation between the last node and the last price. This distance is therefore repainted with every tick. This is necessary to emulate the behavior of the default SMA with COBC = false. In 1-Tick correction mode, the VisualSMA sometimes repaints 1 tick on real-time data. In strategy mode the VisualSMA does not repaint at all.


The indicator exposes a public property that holds the value of the number of bars that were painted back to the last node.

If you want to access the indicator in 1-Tick-correction mode, you will need to access the current value and the prior value of the indicator with each incoming tick. If you want to access the indicator in visual mode, you will need to access the last N values of the indicator (all values that have been repainted). The parameter N can be accessed via
 
Code
int N = VisualSMA(period, false, true, VisualSMACalcMode.Visual, thisPeriodType, thisPeriodValue, thisPriceType).Repaint[0];

where thisPeriodType may take the values VisualSMAPeriodType.Minute, VisualSMAPeriodType.Second, VisualSMAPeriodType.Tick, VisualSMAPeriodType.Volume. Once you have retrieved the value of N, you will then need to access the current and the prior N values of the indicator and call them.


Limitations

The VisualSMA cannot perform calculations on Renko bars, I will take away that option. When the VisualSMA is called by another indicator, the option to calculate values from range bars is disabled, as those values will not be reproduced correctly.


Example

Attached is an access indicator, which shows how the VisualSMA can be accessed by another indicator.


Attached Files
Elite Membership required to download: AccessVisualSMA.cs
Started this thread Reply With Quote
Thanked by:
  #360 (permalink)
 
sudhirc's Avatar
 sudhirc 
detroit,mi
sc
 
Experience: Intermediate
Platform: NT
Broker: NT
Trading: ES
Frequency: Every few months
Duration: Hours
Posts: 417 since Sep 2011
Thanks Given: 1,709
Thanks Received: 473


@Fat Tails

Hi FatTails,

I'm having trouble importing this file. It says i have duplicate method names - dont know what file it is refering to ?
any ideas on what to do from my side or can you change the method name and reattach it.

Thank you,
Sudhir


Reply With Quote




Last Updated on April 19, 2022


© 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