NexusFi: Find Your Edge


Home Menu

 





color coding to higher-same-lower closes


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one stephenszpak with 4 posts (0 thanks)
    2. looks_two Quick Summary with 1 posts (0 thanks)
    3. looks_3 cory with 1 posts (1 thanks)
    4. looks_4 MWinfrey with 1 posts (1 thanks)
    1. trending_up 3,923 views
    2. thumb_up 2 thanks given
    3. group 3 followers
    1. forum 7 posts
    2. attach_file 4 attachments




 
Search this Thread
  #1 (permalink)
 
stephenszpak's Avatar
 stephenszpak 
Massachusetts (USA)
 
Experience: None
Platform: NinjaTrader
Trading: YM
Posts: 750 since Jun 2009
Thanks Given: 144
Thanks Received: 356

Hi

I don't think what I want is possible in NT without coding.

Has this coding been done already? If the link can be provided that's great.



I just want color coding of the price bars according to the closes. The close
relative to the open is NOT part of what I want.

If close higher than previous close, then yellow.
If close same as previous close, then red.
If close lower than previous close, then blue.


In the attachment I would like to see red, red, red, blue,red, blue, red,
just as an example, as one looks left to right concentrating on the vertical lines I've added.
I would think this has been done already by someone somewhere?

- Stephen


Attached Thumbnails
Click image for larger version

Name:	Color coding HSL.jpg
Views:	304
Size:	194.4 KB
ID:	23142  
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
UMA Votes Tonight: Polymarkets $80M Strategy Bitcoin Bat …
Prediction Markets & Event Contracts
Wood Mackenzie Drops $200 Oil Forecast -- Airspace Expir …
Prediction Markets & Event Contracts
Post-Summit Scorecard: $36M in May 15 Bets Settle Near-Z …
Prediction Markets & Event Contracts
Iran Fired a Missile at Israel Last Night. The $8M June …
Prediction Markets & Event Contracts
Sundays Verdict: Lebanon Locked at 99.85% as Iran June 7 …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
8 thanks
Darmok and Jalad at Tanagra
1 thanks
  #3 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,099 since Jun 2009
Thanks Given: 877
Thanks Received: 8,098



stephenszpak View Post
Hi

I don't think what I want is possible in NT without coding.

Has this coding been done already? If the link can be provided that's great.



I just want color coding of the price bars according to the closes. The close
relative to the open is NOT part of what I want.

If close higher than previous close, then yellow.
If close same as previous close, then red.
If close lower than previous close, then blue.


In the attachment I would like to see red, red, red, blue,red, blue, red,
just as an example, as one looks left to right concentrating on the vertical lines I've added.
I would think this has been done already by someone somewhere?

- Stephen

see post 105


or z1trend


Reply With Quote
Thanked by:
  #4 (permalink)
 
stephenszpak's Avatar
 stephenszpak 
Massachusetts (USA)
 
Experience: None
Platform: NinjaTrader
Trading: YM
Posts: 750 since Jun 2009
Thanks Given: 144
Thanks Received: 356

I checked out DoubleMAPaintHolyGrail. That seemed to be
the closest to what I wanted. NT said my moving averages
were more recent than the ones in the indicator listed above
so I didn't accept them. I don't know if that affected things or
not. It didn't seem to work to do my basic color coding. I might
try to program this myself but it will probably take some time, if
I can do it at all.

Thanks for the effort,

- Stephen

Ok, I got this far but it's not quite right...

protected override void OnBarUpdate()
{
// Use this method for calculating your indicator values. Assign a value to each
// plot below by replacing 'Close[0]' with your own formula.
Plot0.Set(Close[0]);


if (Close[0] > Close [1])
BarColor = Color.Yellow;
if (Close[0]==Close[1])
BarColor = Color.Red;
if (Close[0]<Close [1])
BarColor = Color.MediumPurple;


}


Started this thread Reply With Quote
  #5 (permalink)
 vegasfoster 
las vegas
 
Experience: Intermediate
Platform: Sierra Chart
Broker: Velocity/IB
Trading: 6E
Posts: 1,145 since Feb 2010
Thanks Given: 304
Thanks Received: 845

How do you use it?


Attached Files
Elite Membership required to download: ClosePosition.zip
Reply With Quote
  #6 (permalink)
 
stephenszpak's Avatar
 stephenszpak 
Massachusetts (USA)
 
Experience: None
Platform: NinjaTrader
Trading: YM
Posts: 750 since Jun 2009
Thanks Given: 144
Thanks Received: 356

vegasfoster

Thanks a lot!

I'm just playing around using Kase bars on CL market replay data.
See attachment if you wish.

- Stephen


Attached Thumbnails
Click image for larger version

Name:	Image using HSL on Kase bars.jpg
Views:	323
Size:	210.1 KB
ID:	23159  
Started this thread Reply With Quote
  #7 (permalink)
 
MWinfrey's Avatar
 MWinfrey 
Lubbock TX
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Stage 5 Trading
Trading: CL
Posts: 1,878 since Jul 2009
Thanks Given: 1,450
Thanks Received: 3,337


stephenszpak View Post
vegasfoster

Thanks a lot!

I'm just playing around using Kase bars on CL market replay data.
See attachment if you wish.

- Stephen

Take a look at this and let me know what you think. You will see that I roundprice to the ticksize so you can actually compare closes. Otherwise, you will see some situations where Close[0] == Close[1] bars that don't get painted correctly.

I am attaching the .cs file so you can put it in either nt7 or nt6.5

Mike


Attached Files
Elite Membership required to download: mwColorBars.cs
Reply With Quote
Thanked by:
  #8 (permalink)
 
stephenszpak's Avatar
 stephenszpak 
Massachusetts (USA)
 
Experience: None
Platform: NinjaTrader
Trading: YM
Posts: 750 since Jun 2009
Thanks Given: 144
Thanks Received: 356


MWinfrey View Post
Take a look at this and let me know what you think. You will see that I roundprice to the ticksize so you can actually compare closes. Otherwise, you will see some situations where Close[0] == Close[1] bars that don't get painted correctly.

I am attaching the .cs file so you can put it in either nt7 or nt6.5

Mike

I'm ok for now. Thanks.


Started this thread Reply With Quote




Last Updated on October 17, 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