Welcome to the Traders Laboratory Forums.
TradeStation Custom Programming Discuss projects, ideas, obstacles in programming with TradeStation.

Reply
Old 07-15-2011, 10:47 PM   #1

Tradewinds's Avatar

Join Date: Nov 2008
Location: Northeast U.S.
Posts: 891
Ignore this user

Thanks: 373
Thanked 231 Times in 164 Posts
Blog Entries: 6

Plotpaintbar Color Bar

This is a quote from EasyLanguage Help:

Quote:
This reserved word is used only within a PaintBar study, and enables you to paint the entire bar a specified color or paint the bar between two specified values.
I tried using this reserved word in an indicator to change the color of a price bar, and got the error msg:

Quote:
This word can only be used in a PaintBar study
I guess I would need to recreate the main part of my code inside a PaintBar study in order to paint the bar. So I'd have the code for the same study running twice. Once for the lower study, and once to paint the bar. Hopefully EasyLanguage will consolidate everything into one and just have indicators.
__________________
Precise, "dialed-in", targeted combination setups, like opening a combination lock; is the experience you should be having while trading. Dial left, right, left, . . . click - the lock opens.
Tradewinds is offline  
Reply With Quote
Old 07-19-2011, 03:56 PM   #2

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,477 Times in 912 Posts

Re: Plotpaintbar Color Bar

Quote:
Originally Posted by Tradewinds »
This is a quote from EasyLanguage Help:



I tried using this reserved word in an indicator to change the color of a price bar, and got the error msg:



I guess I would need to recreate the main part of my code inside a PaintBar study in order to paint the bar. So I'd have the code for the same study running twice. Once for the lower study, and once to paint the bar. Hopefully EasyLanguage will consolidate everything into one and just have indicators.
you can use PLOT instead of PaintBar.
makes things simpler and easier.
__________________



Only an idiot would reply to a stupid post
Tams is offline  
Reply With Quote
Old 07-19-2011, 08:46 PM   #3

Tradewinds's Avatar

Join Date: Nov 2008
Location: Northeast U.S.
Posts: 891
Ignore this user

Thanks: 373
Thanked 231 Times in 164 Posts
Blog Entries: 6

Re: Plotpaintbar Color Bar

Quote:
Originally Posted by Tams »
you can use PLOT instead of PaintBar.
makes things simpler and easier.
Yes, that would work, but I have a lower study that plots in subgraph 1, and I want to change the bars in the main chart. The plots will appear in the lower study. I can't have plots from the same study appear in both the subgraph and the main chart. Not that I know of. I can have a lower study, and plot TEXT in the upper study, which is helpful. I guess I would need to recreate the lower study a second time, then use that to paint the bars. I could create functions that help drive both studies so I'm not creating the same study code twice.
__________________
Precise, "dialed-in", targeted combination setups, like opening a combination lock; is the experience you should be having while trading. Dial left, right, left, . . . click - the lock opens.
Tradewinds is offline  
Reply With Quote
Old 07-19-2011, 09:36 PM   #4

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,477 Times in 912 Posts

Post Re: Plotpaintbar Color Bar

this is what I do...

use the one set of logics,
and 2 different types of plots.

I can then apply the indicator twice in the same chart.

eg.

Code:
input:
chart(1);   // set to chart 1 or chart 2

if chart = 1 then
begin
     // set plots for main chart
end
else
begin
     // set plots for subchart
end;
__________________



Only an idiot would reply to a stupid post
Tams is offline  
Reply With Quote

Reply

Tags
paintbar

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Set Background Color aaa Coding Forum 2 05-29-2010 09:56 AM
Volume Weighed Color Bars Tams Trading Indicators 14 07-03-2009 09:35 AM
Finding Hex Color Values for TS? daedalus Coding Forum 4 04-01-2009 02:29 PM
Help Detecting Color Changes in MA (TS) ephi144 Coding Forum 2 11-25-2008 09:31 AM
Help with Some Lin Reg Curve Color Coding - MQL4 to TS turboscottomatic Coding Forum 3 05-19-2008 08:27 AM

All times are GMT -4. The time now is 09:59 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.