futures io



Oooo pretty colors


Discussion in EasyLanguage Programming

Updated
    1. trending_up 3,976 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 150,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: 18 since Feb 2020
Thanks: 6 given, 3 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:	89
Size:	4.8 KB
ID:	321109  
Reply With Quote

Can you help answer these questions
from other members on futures io?
TradeStation live and dev environments
Platforms and Indicators
How to get Index/Equity Data for NT?
NinjaTrader
Rival systems and Exegy
Platforms and Indicators
Determination of intraday rise and fall
EasyLanguage Programming
Mt5 Tradestation Integration
TradeStation
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Spoo-nalysis ES e-mini futures S&P 500
38 thanks
New NinjaTrader
29 thanks
Artificial Intelligence (AI) and Chat GPT
28 thanks
Is anyone actually making money?
18 thanks
how to avoid chop
5 thanks

 
(login for full post details)
  #2 (permalink)
 ABCTG   is a Vendor
 
 
Posts: 2,401 since Apr 2013
Thanks: 431 given, 1,601 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: 18 since Feb 2020
Thanks: 6 given, 3 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



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