Color coding for indicator line help? - futures io
futures io futures trading



Color coding for indicator line help?


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one hector24 with 4 posts (0 thanks)
    2. looks_two GridKing with 2 posts (1 thanks)
    3. looks_3 Big Mike with 1 posts (0 thanks)
    4. looks_4 Fat Tails with 1 posts (1 thanks)
    1. trending_up 4,444 views
    2. thumb_up 4 thanks given
    3. group 3 followers
    1. forum 8 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

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

 
Search this Thread
 

Color coding for indicator line help?

(login for full post details)
  #1 (permalink)
austin, texas
 
Experience: Intermediate
Platform: ninja trader
Trading: currency futures
 
Posts: 506 since Jan 2011
Thanks: 14 given, 234 received

If I have a momentum line plotting on Ninja and it is just a single colored line how can I code it to color a particular color for up move and a selected color for down move.

Thanks
Hector

Started this thread Reply With Quote

Journal Challenge February 2021 results:
Competing for $1500 in prizes from Topstep
looks_oneSBtrader82 's Trading Journalby SBtrader82
(173 thanks from 31 posts)
looks_twoJust BEING a Trader: Letting Go!!by iqgod
(120 thanks from 33 posts)
looks_3Wisdom is Emptinessby Mtype
(68 thanks from 25 posts)
looks_4Deetee’s DAX Trading Journal (time based)by Deetee
(35 thanks from 17 posts)
looks_5Journal for peanuts1956by peanuts1956
(23 thanks from 13 posts)
 
 
(login for full post details)
  #2 (permalink)
San Diego, CA USA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: ES
 
GridKing's Avatar
 
Posts: 3,650 since May 2011
Thanks: 584 given, 881 received


hector24 View Post
If I have a momentum line plotting on Ninja and it is just a single colored line how can I code it to color a particular color for up move and a selected color for down move.

Thanks
Hector

here's what's in guide


Examples

// Initialize method of a custom indicator
protected override void Initialize()
{

// Lines are added to the Lines collection in order
Add(new Line(Color.Gray, 30, "Lower")); // Stored in Lines[0]
Add(new Line(Color.Gray, 70, "Upper")); // Stored in Lines[1]
}



// Dynamically change the upper line's color and thickness based on the indicator value

protected override void OnBarUpdate()

{

if (Value[0] > 70)

Lines[1].Pen = new Pen(Color.Blue, 3);

else

Lines[1].Pen = new Pen(Color.Gray, 1);

}

Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to GridKing for this post:
 
(login for full post details)
  #3 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,728 received



hector24 View Post
If I have a momentum line plotting on Ninja and it is just a single colored line how can I code it to color a particular color for up move and a selected color for down move.

Thanks
Hector

Best you post your momentum line here for modification.

Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
(login for full post details)
  #4 (permalink)
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
 
Big Mike's Avatar
 
Posts: 49,761 since Jun 2009
Thanks: 32,302 given, 97,533 received

 
Thread Moved


Moved to NinjaTrader Programming



When creating a new thread, note which subforum you are in. Here is a short list of suggestions:

- Topic: Anything to do with an Elite indicator -> Subforum: The Elite Circle
- Topic: Looking for an existing indicator, or how-to use an indicator -> Subforum: (the platform)
- Topic: Programmer needing help with non-Elite indicator -> Subforum: (the platform) - Programming
- Topic: Want an indicator created/modified -> Reply to "Want indicator created free" in Elite Circle
- Topic: Vendors (trading rooms, commercial indicators) -> Subforum: Vendors/Product Reviews
- Topic: Discussion of Forex or Currency trading -> Subforum: Forex and Currency Trading
- Topic: Journals of your trading -> Subforum: Trading Journals or Elite Trading Journals
- Topic: General trading related discussions -> Subforum: Traders Hideout
- Topic: Discussion of a trading method -> Subforum: Traders Hideout
- Topic: Automated Trading -> Subforum: Elite Automated Trading

Last, any Elite Member may create more or less any of these topics in The Elite Circle at your own discretion (your support is appreciated).

This is just a short general list and doesn't cover everything. If you are unsure where to create your new thread, just create it in Traders Hideout and a moderator will move it if necessary.

-- Big Mike Trading



Mike

We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #5 (permalink)
austin, texas
 
Experience: Intermediate
Platform: ninja trader
Trading: currency futures
 
Posts: 506 since Jan 2011
Thanks: 14 given, 234 received

Gridking, thanks for your coding. I don't have a clue on how this works. When you have time could you explain how I set this up in Ninja.

Thanks
Hector

Started this thread Reply With Quote
 
(login for full post details)
  #6 (permalink)
San Diego, CA USA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: ES
 
GridKing's Avatar
 
Posts: 3,650 since May 2011
Thanks: 584 given, 881 received


hector24 View Post
Gridking, thanks for your coding. I don't have a clue on how this works. When you have time could you explain how I set this up in Ninja.

Thanks
Hector

Since you are Elite member go to this thread and watch the webinar

I am not much of a programmer and just starting , but the webinar will show you much of what you need to know once you have the basics down....

As far as the basics first , I think the best way to start out is to go to control panel>Help>Help> Ninjascript>educationalresources>basic programming concepts and just start reading , that is where i started , then start to use the wizard with the aid of help guide and then go into code and start to change things and see, but need to get some idea of basics first then the webinar will fill in the blanks

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #7 (permalink)
austin, texas
 
Experience: Intermediate
Platform: ninja trader
Trading: currency futures
 
Posts: 506 since Jan 2011
Thanks: 14 given, 234 received

Thanks GridKing, Hector. Your information is really appreciated.

Started this thread Reply With Quote
 
(login for full post details)
  #8 (permalink)
Florida
 
Experience: Intermediate
Platform: NT7
Trading: CL, NQ, NG
 
Posts: 469 since Jun 2009
Thanks: 1,401 given, 402 received

Hector,

I believe GridKing is showing you how to add two horizontal lines of value 30 or 70.

If I understand your request, you're asking for the rising line to be one color and the falling line to be another color.

if you do a search for PlotColors in futures.io (formerly BMT), you'll find plenty of code examples from the excellent programmers here.

something like this...
 
Code
if(Rising(Value))PlotColors[0][0]=upColor;
if(Falling(Value))PlotColors[0][0]=downColor;
you would need to define upColor/downColor in the variables section.

HTH,

kz

Reply With Quote
The following 2 users say Thank You to zeller4 for this post:
 
(login for full post details)
  #9 (permalink)
austin, texas
 
Experience: Intermediate
Platform: ninja trader
Trading: currency futures
 
Posts: 506 since Jan 2011
Thanks: 14 given, 234 received

Zeller4, yes your exactly right that what is I am looking for. I am going to check the information you passed to me.

Thanks
Hector

Started this thread Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > Color coding for indicator line help?


Last Updated on July 13, 2011


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Journal Challenge w/$1500 prizes from Topstep!

February
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Call Option Buying: The New Pain Trade? w/Carley Garner

Elite only
     



Copyright © 2021 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