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 188,964 views
    2. thumb_up 743 thanks given
    3. group 87 followers
    1. forum 424 posts
    2. attach_file 166 attachments




 
Search this Thread

Coding Multi Time Frame (MTF) Indicators with NinjaTrader

  #331 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


Erez View Post
Hi @Fat Tails,

I 'm trying to use "VisualSMA" with displacement (positive number) and there is small issue with line plot color (last bar only) that paints with default gray color instead the selected rising/falling colors.
I've noticed that this behavior exist in all indicators that use "PlotColors[0][x]"
And my way to solve this in my indicators, is to use the inverse displacement value in "PlotColors"

I hope you will have time to check this issue.
Thanks

Erez

 
Code
protected override void OnStartUp(){PhaseShift = -1 * Displacement;}

 protected override void OnBarUpdate(){PlotColors[0][PhaseShift]}

I know that problem well, it is a pain. It affects plot colors, paint bars and draw methods. I have changed a few hundred lines of code to allow for displacement. Please let me know, if it works as expected.

The updated indicators can be found here:




The update would be needed for all indicators that have conditional plots (based on slope etc.), paint bars, use draw methods, so that would be real fun.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
How to apply profiles
Traders Hideout
Exit Strategy
NinjaTrader
Increase in trading performance by 75%
The Elite Circle
ZombieSqueeze
Platforms and Indicators
Trade idea based off three indicators.
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
My NQ Trading Journal
14 thanks
GFIs1 1 DAX trade per day journal
11 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
10 thanks
  #332 (permalink)
 Erez 
Haifa,,,
 
Experience: Intermediate
Platform: NinjaTrader
Broker: CQG
Trading: Futures
Posts: 186 since Mar 2011
Thanks Given: 181
Thanks Received: 869


Fat Tails View Post
I know that problem well, it is a pain. It affects plot colors, paint bars and draw methods. I have changed a few hundred lines of code to allow for displacement. Please let me know, if it works as expected.

The updated indicators can be found here:




The update would be needed for all indicators that have conditional plots (based on slope etc.), paint bars, use draw methods, so that would be real fun.

It looks perfect so far.
You remind me that in my indicators I have changed this issue only in line plot, so I need to check paint bars etc…

Thanks for your effort.

Erez

Reply With Quote
Thanked by:
  #333 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,440 since Jun 2009
Thanks Given: 33,212
Thanks Received: 101,599


Notifications sent.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #334 (permalink)
 elgaza 
Toronto Canada
 
Experience: Master
Platform: NinjaTrader 7
Trading: ES
Posts: 109 since Jul 2011
Thanks Given: 16
Thanks Received: 18



Ok so you can see what I have requested I need, sorry please can you do something like this or better

I have ploted 3 squares in the bottom corner of the screen that basically show the current color of each MA

it is needed when they are all together next to each other and the price is also there

the only way for me to tell the color is to expand the screen, this is what I am trying to avoid

to be able to tell the current color at all time even when they are on top of each other.

now it doesn't matter where you are going to place it on the screen as long as it is seen.

Thank you very much.

Great great job fat tail, I take my hat off for you.

Eli.

Reply With Quote
  #335 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


elgaza View Post


Ok so you can see what I have requested I need, sorry please can you do something like this or better

I have ploted 3 squares in the bottom corner of the screen that basically show the current color of each MA

it is needed when they are all together next to each other and the price is also there

the only way for me to tell the color is to expand the screen, this is what I am trying to avoid

to be able to tell the current color at all time even when they are on top of each other.

now it doesn't matter where you are going to place it on the screen as long as it is seen.

Thank you very much.

Great great job fat tail, I take my hat off for you.

Eli.

You will already notice the colors on the price marker. If you select the colors accordingly, you will know which of the SMAs is rising or falling.

Plotting the rectangles as you suggested would require to code a custom indicator, accessing the three individual SMAs, it is not that easy.

Started this thread Reply With Quote
  #336 (permalink)
 elgaza 
Toronto Canada
 
Experience: Master
Platform: NinjaTrader 7
Trading: ES
Posts: 109 since Jul 2011
Thanks Given: 16
Thanks Received: 18

I understand, the price are really one on top of the other as you can see

but I understand if its a hustle

again thank you very much for everything.

Reply With Quote
  #337 (permalink)
 zt379 
UK London
 
Platform: NT
Posts: 2,048 since Sep 2009
Thanks Given: 1,572
Thanks Received: 1,936

Hello @Fat Tails

If possible I'd like to request the option of Background colour for the Visual SMA and Visual EMA ?
Many thx and happy Fat Tails Day to you kind Sir...
(although I think "Happy Harry Day" has a better ring to it)

Reply With Quote
Thanked by:
  #338 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


zt379 View Post
Hello @Fat Tails

If possible I'd like to request the option of Background colour for the Visual SMA and Visual EMA ?
Many thx and happy Fat Tails Day to you kind Sir...
(although I think "Happy Harry Day" has a better ring to it)

I am not yet entirely happy with the VisualSMA, I have to review it anyhow. Adding a backcolor option is possible, but there are lots of lines of code to be inserted. This indicator is no easy piece of code, the multi-timeframe logic of NinjaTrader is a bit quirky.

Started this thread Reply With Quote
Thanked by:
  #339 (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
This indicator is no easy piece of code, the multi-timeframe logic of NinjaTrader is a bit quirky.

I bet the complexity is an understatement! It's too bad the Visual EMA/SMA cannot be used on a tick chart without the non-equadistant spacing.

Reply With Quote
  #340 (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,353



plethora View Post
I bet the complexity is an understatement! It's too bad the Visual EMA/SMA cannot be used on a tick chart without the non-equadistant spacing.

@plethora

Oh, come on ... put up two separate charts ... you are young enough to still have some degree of hand eye coordination, multitasking ability and your synapses probably still synapse with some degree of regularity and dependability .... where as I have to pin my address to my shirt if I go outside...

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




Last Updated on April 19, 2022


© 2024 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 - Privacy Policy - Downloads - Top
no new posts