Color change in an indicator line - NinjaTrader Programming | futures io social day trading
futures io futures trading


Color change in an indicator line
Updated: Views / Replies:3,882 / 9
Created: by macro Attachments:3

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • 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.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Color change in an indicator line

  #1 (permalink)
Elite Member
South Pasadena, California, Un
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: ES
 
macro's Avatar
 
Posts: 5 since Dec 2010
Thanks: 0 given, 2 received

Color change in an indicator line

Hi,
Could someone give me a snippet of code that changes the color of an indicator line to green when it moves above zero and red when it moves below zero?
Thanks in advance.
Macro

Reply With Quote
 
  #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.

 
  #3 (permalink)
Elite Member
Dallas, TX
 
Futures Experience: Beginner
Platform: Ninjatrader
Broker/Data: Zen-Fire
Favorite Futures: ZN, 6E
 
gulabv's Avatar
 
Posts: 284 since May 2010
Thanks: 159 given, 155 received


NT has built-in functions called CrossAbove and CrossBelow to check for the zero cross.
Check out the help section of NT on these functions.
Also I would suggest you check out some of the free indicators in the futures.io (formerly BMT) download area for code samples on how to change the color. You will have to write code to modify the plot properties but it's difficult to give a specific answer since you have not specified what indicator you want to modify.

Reply With Quote
The following user says Thank You to gulabv for this post:
 
  #4 (permalink)
Elite Member
Houston,Tx
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: TF
 
ThatManFromTexas's Avatar
 
Posts: 2,302 since Feb 2010
Thanks: 1,208 given, 4,291 received


macro View Post
Hi,
Could someone give me a snippet of code that changes the color of an indicator line to green when it moves above zero and red when it moves below zero?
Thanks in advance.
Macro

Which indicator? Is it a line or a Histogram? See the attached pic.

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

My daddy always said, "Every day above ground is a good day!"
Attached Thumbnails
Color change in an indicator line-ccicolor.png  
Reply With Quote
 
  #5 (permalink)
Elite Member
South Pasadena, California, Un
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: ES
 
macro's Avatar
 
Posts: 5 since Dec 2010
Thanks: 0 given, 2 received

Color change crossing zero

Hi Man From Texas,
Thank you for your response.
The indicator in question is the LinRegSlope. I know that comes with NT7 and cannot be changed but I like to use a zero line with it and I got tired of drawing a zero line, so I managed to cobble together LinRegSlope with a zero line. Then I realized it would be nice if the indicator changed to green above zero and red below. I am familiar with TS Easy Language and it is an easy matter to do color changes with Easy Language. However, when I looked at the color change code in some other indicators, I decided it was not so easy and obvious in C#.
Your assistance would be most appreciated.
Regards,
Macro

Reply With Quote
 
  #6 (permalink)
Elite Member
Houston,Tx
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: TF
 
ThatManFromTexas's Avatar
 
Posts: 2,302 since Feb 2010
Thanks: 1,208 given, 4,291 received

Here Ya Go


macro View Post
Hi Man From Texas,
Thank you for your response.
The indicator in question is the LinRegSlope. I know that comes with NT7 and cannot be changed but I like to use a zero line with it and I got tired of drawing a zero line, so I managed to cobble together LinRegSlope with a zero line. Then I realized it would be nice if the indicator changed to green above zero and red below. I am familiar with TS Easy Language and it is an easy matter to do color changes with Easy Language. However, when I looked at the color change code in some other indicators, I decided it was not so easy and obvious in C#.
Your assistance would be most appreciated.
Regards,
Macro

Here ya go...

You should see all the really cool free stuff in the Elite Section. I strongly suggest you become an Elite member (Click on Elite Access at the top of the home page) it's painless and offers a tremendous amount of resources for traders.

Disclaimer: I am not a programmer, coach, trainer or self appointed guru. Have a professional review any code you receive from me before you trade real money with it. I am an Elite member of futures.io (formerly BMT) but am not an employee of or a spokesperson for futures.io (formerly BMT) and receive no compensation for recommending futures.io (formerly BMT) Elite membership.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


LinRegSlopeTMFT.zip

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
The following 2 users say Thank You to ThatManFromTexas for this post:
 
  #7 (permalink)
Elite Member
Dallas, TX
 
Futures Experience: Beginner
Platform: Ninjatrader
Broker/Data: Zen-Fire
Favorite Futures: ZN, 6E
 
gulabv's Avatar
 
Posts: 284 since May 2010
Thanks: 159 given, 155 received

LOL TMFT you crack me up each time you post on this forum! The next beer is on me!!

Reply With Quote
 
  #8 (permalink)
Elite Member
South Pasadena, California, Un
 
Futures Experience: Intermediate
Platform: NinjaTrader
Favorite Futures: ES
 
macro's Avatar
 
Posts: 5 since Dec 2010
Thanks: 0 given, 2 received

THANKS!!

Thanks so much for the responses, especially TMFT.
Best Regards,
Macro

Reply With Quote
 
  #9 (permalink)
Elite Member
Denver, CO
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: NinjaTrader Brokerage
Favorite Futures: ES
 
NinjaTrader's Avatar
 
Posts: 1,247 since May 2010
Thanks: 152 given, 1,880 received


macro View Post
Hi,
Could someone give me a snippet of code that changes the color of an indicator line to green when it moves above zero and red when it moves below zero?
Thanks in advance.
Macro


Here is a good reference to start - Indicator: Multi-Colored Plots - NinjaTrader Support Forum

Reply With Quote
The following 3 users say Thank You to NinjaTrader for this post:
 
  #10 (permalink)
Elite Member
Accokeek, USA
 
Futures Experience: Beginner
Platform: NT & TOS
Favorite Futures: ES
 
Posts: 32 since Mar 2011
Thanks: 6 given, 12 received

Indicator color change up/dn NT7


Good day TMFT,

I sent a message on this. How can I or you :-) do this for an ADX or CCI, when the indicator pivots form up/dn? I am not a coder, but figured adding the correct syntax of the NT7 indicator and saving it with a new name would work. No success finding the correct syntax to make it work.

Any help would be appreciated. Thanks -Ky

Reply With Quote

Reply



futures io > > > > > Color change in an indicator line

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Opening Breakouts and Reversals w/Al Brooks

Elite only
 

Introducing daytradr by Jigsaw, new stand-alone platform

Oct 19
 

RandBots: AutoTrading Bots to diversify your trading

Oct 24
 

TopstepTrader: Profiting Without Risking Your Own Money

Oct 26

Building Open Source Indicators for NT8 w/Fat Tails @ Lizard Indicators

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Color coding for indicator line help? hector24 NinjaTrader Programming 8 July 13th, 2011 09:10 PM
Change color of LineOnClose from an indicator? ThatManFromTexas NinjaTrader 1 May 11th, 2011 06:00 PM
Color Shading Fibonacci Line Levels trs3042 NinjaTrader 2 December 30th, 2010 12:09 PM
ADX color line change in DM Indicator Joshua 1 vs 8 NinjaTrader Programming 30 October 31st, 2010 03:10 PM
Color changing Regression Line with Paint Bar Gibby NinjaTrader Programming 49 April 23rd, 2010 02:54 PM


All times are GMT -4. The time now is 11:24 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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 2017-10-17 in 0.12 seconds with 20 queries on phoenix via your IP 54.158.55.5