Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 02-10-2011, 11:04 AM   #1

ValueTrader's Avatar

Join Date: Sep 2010
Posts: 72
Ignore this user

Thanks: 32
Thanked 16 Times in 12 Posts

Colour Bar EL Code

I'm trying to build an EL code for colour bars. Losely based on Jerry's Shapiro effect entry stlye.

The basic idea is

if Current Bar H > last bar High then colour green
if Current bar L < last bar low then colour red
If CB H>LB H and CB L< LB L then colour black.

It would be good if it updated intrabar as the black changing to green or black would be a great alert to a move away from value.


Thanks

VT
ValueTrader is offline  
Reply With Quote
Old 02-10-2011, 11:12 AM   #2

Tams's Avatar

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

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

Re: Colour Bar EL Code

Quote:
Originally Posted by ValueTrader »
I'm trying to build an EL code for colour bars. Losely based on Jerry's Shapiro effect entry stlye.

The basic idea is

if Current Bar H > last bar High then colour green
if Current bar L < last bar low then colour red
If CB H>LB H and CB L< LB L then colour black.

It would be good if it updated intrabar as the black changing to green or black would be a great alert to a move away from value.


Thanks

VT

once a bar turned black... it cannot turn green again. because it is an OUTSIDE BAR
__________________



Only an idiot would reply to a stupid post
Tams is offline  
Reply With Quote
Old 02-10-2011, 12:18 PM   #3

ValueTrader's Avatar

Join Date: Sep 2010
Posts: 72
Ignore this user

Thanks: 32
Thanked 16 Times in 12 Posts

Re: Colour Bar EL Code

Here is my fisrt attempt...
[code]Inputs:
UpColor (Green),
DnColor (red),
UnCngColor (black);

Variables:
BarColor (0);

If Close > Close[1] then BarColor = UpColor
else
If Close < Close[1] then BarColor = DnColor
else
BarColor = UnCngColor;

Plot1(BarColor);
[code]

But it plots like a line and doesnt change the colour of the bar.

TAMS, I enjoy the cryptic nature of your replys. There was a typo in my original post...you didnt spot it...too quick to react! lol.

"It would be good if it updated intrabar as the black changing to green or RED would be a great alert to a move away from value"

Last edited by ValueTrader; 02-10-2011 at 12:26 PM.
ValueTrader is offline  
Reply With Quote
Old 02-10-2011, 12:35 PM   #4

Tams's Avatar

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

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

Re: Colour Bar EL Code

Quote:
Originally Posted by Tams »
once a bar turned black... it cannot turn green again. because it is an OUTSIDE BAR
Quote:
Originally Posted by ValueTrader »
...
TAMS, I enjoy the cryptic nature of your replys. ...

I have highlighted the OUTSIDE BAR for you.
unless you have something else in mind, if a bar is "outside" and colored black,
the other conditions no longer apply.

Maybe you can draw a mock up chart to explore all the color permutations?
Quote:
Originally Posted by ValueTrader »
...
If CB H>LB H and CB L< LB L then colour black.

It would be good if it updated intrabar as the black changing to green or black would be a great alert to a move away from value.


Thanks

VT
__________________



Only an idiot would reply to a stupid post
Tams is offline  
Reply With Quote
Old 02-10-2011, 12:38 PM   #5

Tams's Avatar

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

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

Re: Colour Bar EL Code

Quote:
Originally Posted by ValueTrader »
Here is my fisrt attempt...
[code]Inputs:
UpColor (Green),
DnColor (red),
UnCngColor (black);

Variables:
BarColor (0);

If Close > Close[1] then BarColor = UpColor
else
If Close < Close[1] then BarColor = DnColor
else
BarColor = UnCngColor;

Plot1(BarColor);
[code]

But it plots like a line and doesnt change the colour of the bar.

TAMS, I enjoy the cryptic nature of your replys. There was a typo in my original post...you didnt spot it...too quick to react! lol.

"It would be good if it updated intrabar as the black changing to green or RED would be a great alert to a move away from value"
ha... this code does not represent the concept you had in post #1.

Close > Close[1] is not the same as CB H > LB H
__________________



Only an idiot would reply to a stupid post
Tams is offline  
Reply With Quote
Old 02-10-2011, 12:42 PM   #6

Tams's Avatar

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

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

Re: Colour Bar EL Code

Quote:
Originally Posted by ValueTrader »
Here is my fisrt attempt...
[code]Inputs:
...
Plot1(BarColor);
[code]

But it plots like a line and doesnt change the colour of the bar.
...
what program you are using?

you have to plot ALL the data points.

ie.
Code:
plot1( High, "High", barcolor);
plot2( Low, "Low", barcolor);
plot3( Open, "Open", barcolor);
plot4( Close, "Close", barcolor);
alternatively, you can look up these keywords:

PlotPaintBar
PlotPB
__________________



Only an idiot would reply to a stupid post
Tams is offline  
Reply With Quote
Old 02-10-2011, 02:11 PM   #7

ValueTrader's Avatar

Join Date: Sep 2010
Posts: 72
Ignore this user

Thanks: 32
Thanked 16 Times in 12 Posts

Re: Colour Bar EL Code

Quote:
Originally Posted by Tams »
Maybe you can draw a mock up chart to explore all the color permutations?
Sorry Tams. This post explains what im looking for
http://traderslaboratory.com/forums/...1&postcount=93

I tried the addtional code you suggested but ended up with four lines. I will soldier on and post the developments.


Thanks
VT
ValueTrader is offline  
Reply With Quote
Old 02-10-2011, 02:44 PM   #8

Tams's Avatar

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

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

Re: Colour Bar EL Code

Quote:
Originally Posted by ValueTrader »
Sorry Tams. This post explains what im looking for
http://traderslaboratory.com/forums/...1&postcount=93

I tried the addtional code you suggested but ended up with four lines. I will soldier on and post the developments.


Thanks
VT
you are trying to run before walk.
I would suggest you to invest a few minutes of your precious time with the manual. It will pay big dividends.
Getting Started with EasyLanguage is the book you need if you're thinking about using EasyLanguage but don't know where to start. It is a easy to read primer, with plenty of examples and illustrations. After reading this book, you should be able to whip up any indicators at will.


Regarding the 4 lines, you need to format the plots as Bar High, Bar Low, etc.
__________________



Only an idiot would reply to a stupid post

Last edited by Tams; 02-10-2011 at 02:57 PM.
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
Multicharts Colour Question nuno-online Coding Forum 3 12-18-2009 02:46 PM
What EL Code Should I Use ? emptyvault Coding Forum 4 07-01-2009 10:08 AM
Looking For LUA Code Help Dudewanarace Coding Forum 0 03-10-2009 11:57 PM
ADE Code karsat Coding Forum 0 03-08-2009 08:06 PM
P&F Code point-figure Coding Forum 0 02-17-2009 06:24 AM

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