Oooo pretty colors - futures io
futures io



Oooo pretty colors


Discussion in EasyLanguage Programming

Updated
    1. trending_up 597 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 1 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
 

Oooo pretty colors

(login for full post details)
  #1 (permalink)
swingbatter
Arlington
 
 
Posts: 17 since Feb 2020
Thanks: 6 given, 2 received

This line of code is making each candlestick a different color in my PaintBar study. (Resaving changes the color palette.)

PlotPB(High, Low, Open, Close, "", elsystem.drawing.color.FromArgb(255,255,255,255) );

Any idea why? Shouldn't it just make them all white?

Attached Thumbnails
Click image for larger version

Name:	PBcolors.png
Views:	28
Size:	4.8 KB
ID:	321109  
Reply With Quote

Can you help answer these questions
from other members on futures io?
Tick counter that works with directions?
NinjaTrader
Take Profit/ Tpx during crypto futures trading
Crypto Futures
Emini Trading Levels
Emini and Emicro Index
 
 
(login for full post details)
  #2 (permalink)
 ABCTG   is a Vendor
 
 
Posts: 2,307 since Apr 2013
Thanks: 421 given, 1,537 received

swingbatter,

as far as I am aware legacy plots are not designed to use Color objects, they are intended for the standard or custom foreground and background color to a Forms control or DrawingObject (while plots are not a DrawingObject). Plots expect legacy colors, one of the 16 named colors (like Red or Blue etc.) or RGB/ARGB values.
"elsystem.drawing.color.FromArgb(255,255,255,255)" is not an integer or double and what value Tradestation uses
when you use it with legacy plots might be a question to ask the developers directly. The reason why you are seeing different
colors for every bar is likely due to the fact that you create a new instance of the object on every code calculation.
If you would create the color once only and then use that going forward, you should see the same color for all bars (although likely
not white).

For your code snippet the better approach would be using something along the lines of:

Variables:
int plotColor ( ARGB( 255, 255, 255, 255) );

PlotPB(High, Low, Open, Close, "", plotColor );

Regards,

ABCTG



swingbatter View Post
This line of code is making each candlestick a different color in my PaintBar study. (Resaving changes the color palette.)

PlotPB(High, Low, Open, Close, "", elsystem.drawing.color.FromArgb(255,255,255,255) );

Any idea why? Shouldn't it just make them all white?


Follow me on Twitter Reply With Quote
The following user says Thank You to ABCTG for this post:
 
(login for full post details)
  #3 (permalink)
swingbatter
Arlington
 
 
Posts: 17 since Feb 2020
Thanks: 6 given, 2 received



ABCTG View Post
swingbatter,

as far as I am aware legacy plots are not designed to use Color objects, they are intended for the standard or custom foreground and background color to a Forms control or DrawingObject (while plots are not a DrawingObject). Plots expect legacy colors, one of the 16 named colors (like Red or Blue etc.) or RGB/ARGB values.
"elsystem.drawing.color.FromArgb(255,255,255,255)" is not an integer or double and what value Tradestation uses
when you use it with legacy plots might be a question to ask the developers directly. The reason why you are seeing different
colors for every bar is likely due to the fact that you create a new instance of the object on every code calculation.
If you would create the color once only and then use that going forward, you should see the same color for all bars (although likely
not white).

For your code snippet the better approach would be using something along the lines of:

Variables:
int plotColor ( ARGB( 255, 255, 255, 255) );

PlotPB(High, Low, Open, Close, "", plotColor );

Regards,

ABCTG

Yes indeed! Thank you ABCTG. Always so knowledgeable.

Reply With Quote


futures io Trading Community Platforms and Indicators EasyLanguage Programming > Oooo pretty colors


Last Updated on January 5, 2022


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
     



Copyright © 2022 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), 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