NexusFi: Find Your Edge


Home Menu

 





Oooo pretty colors


Discussion in EasyLanguage Programming

Updated
    1. trending_up 4,720 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 1 attachments




 
Search this Thread
  #1 (permalink)
swingbatter
Arlington
 
Posts: 18 since Feb 2020
Thanks Given: 6
Thanks Received: 3

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:	216
Size:	4.8 KB
ID:	321109  
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Iran Update May 8: Still Reviewing MOU, Demands Reparati …
Traders Hideout
ATFX Suspends Prop Trading Unit ATFunded -- Full Review …
Funded Trading Evaluation Firms
Election Sunday Resolves: Peru Heads to Runoff at 42pct, …
Prediction Markets & Event Contracts
Powell in 48 Hours: Word Markets Give 78% on Inflation, …
Prediction Markets & Event Contracts
UMA Votes Tonight: Polymarkets $80M Strategy Bitcoin Bat …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
196 thanks
Sober Journey With S&P
27 thanks
30 Sessions
20 thanks
BERN ALGOS algo trading journal
8 thanks
Volume Indicators
8 thanks
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,448 since Apr 2013
Thanks Given: 494
Thanks Received: 1,642

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 X Reply With Quote
Thanked by:
  #3 (permalink)
swingbatter
Arlington
 
Posts: 18 since Feb 2020
Thanks Given: 6
Thanks Received: 3



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




Last Updated on January 5, 2022


© 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