does anybody has the easylanguage code to paint the daily bars with color?
MultiCharts could have easily built it into the program, (it is available for candle sticks), but since it is not in the program, I have to use a easylanguage study to do the job.
I checked the studies included with MultiCharts, but I could not find any. I guess I have to dust off my coding skill and burn some midnight oil. Before I wreck my brain trying to write the code, does anybody has the code handy that he can share?
Many thanks in advance.
p.s. I will also try Google, but knowing how Google works, I will probably have to wade through 15 pages of search results before I can locate the code.
color bars
Kate:
for example, if the close is higher, paint it blue, if the close is lower, paint it red ?
is it difficult to do ?
I know many charting programs have this feature built-in. I know it can be done with easylanguage, I was just surprised the code is not on the list. I mean you have the code for volume bars, which can be painted with up/down colors. It shouldn't be that difficult to do with the bars, should it?
many thanks if you can find the code for me. i am sure other mc users would find it useful and would appreciate to have it available on the study list. I have tried google but without any success. There are just too many things on google. I went through pages after pages, but could not find the code I want.
TIA
for example, if the close is higher, paint it blue, if the close is lower, paint it red ?
is it difficult to do ?
I know many charting programs have this feature built-in. I know it can be done with easylanguage, I was just surprised the code is not on the list. I mean you have the code for volume bars, which can be painted with up/down colors. It shouldn't be that difficult to do with the bars, should it?
many thanks if you can find the code for me. i am sure other mc users would find it useful and would appreciate to have it available on the study list. I have tried google but without any success. There are just too many things on google. I went through pages after pages, but could not find the code I want.
TIA
- ABC
- Posts: 722
- Joined: 16 Dec 2006
- Location: www.abctradinggroup.com
- Has thanked: 125 times
- Been thanked: 410 times
- Contact:
This might work for you:
You'll have to format the indicator as follows:
Scaling same as symol and Plot1 as "LeftTick", Plot2 "BarHigh", Plot3 "BarLow" and Plot4 "RightTick".
Regards,
ABC
Code: Select all
Inputs:
UpColor (blue),
DnColor (red),
UnCngColor (yellow);
Variables:
BarColor (0);
If Close > Close[1] then BarColor = UpColor
else
If Close < Close[1] then BarColor = DnColor
else
BarColor = UnCngColor;
Plot1(Open, "Open", BarColor);
Plot2(High, "High", BarColor);
Plot3(Low, "Low", BarColor);
Plot4(Close, "Close", BarColor);
Scaling same as symol and Plot1 as "LeftTick", Plot2 "BarHigh", Plot3 "BarLow" and Plot4 "RightTick".
Regards,
ABC
-
- Posts: 186
- Joined: 10 May 2012
- Has thanked: 14 times
- Been thanked: 11 times
Re: color bars
Hi,
I am trying to implement this code. However I dont know how to do the following:
Can you explain how to format the indicator?
Thanks!
I am trying to implement this code. However I dont know how to do the following:
Code: Select all
// You'll have to format the indicator as follows:
Scaling same as symol and Plot1 as "LeftTick", Plot2 "BarHigh", Plot3 "BarLow" and Plot4 "RightTick". //
Thanks!
Re: color bars
Hi KhaosTrader,
rightclick on your chart where you have the indicator on -> format indicator -> choose your indicator and click format ->
click on style-tab -> in the row of plot1 click on "Line" -> you get a scroll-list -> in your case choose "left tick"
Do the same for the other plots following the indicators instructions.
for scaling use the Scaling-tab -> Under "Scaling Range" choose "Same as instrument"
aiti
rightclick on your chart where you have the indicator on -> format indicator -> choose your indicator and click format ->
click on style-tab -> in the row of plot1 click on "Line" -> you get a scroll-list -> in your case choose "left tick"
Do the same for the other plots following the indicators instructions.
for scaling use the Scaling-tab -> Under "Scaling Range" choose "Same as instrument"
aiti
-
- Posts: 186
- Joined: 10 May 2012
- Has thanked: 14 times
- Been thanked: 11 times
Re: color bars
Aiti,
Thanks for your prompt response, actually... I implemented the solution with this command (just an example):
during the painting of the current bar, as its moving up and down, will the bar update realtime? that is it will be one color, but if the condition changes it will update.. So as the above code would work, it could be UpColor in the beginning, then it can change to Outsidebar if the condition of the current bar changes realtime?
Thanks for your prompt response, actually... I implemented the solution with this command (just an example):
Code: Select all
plotpaintbar(h,l,o,c,"",UpColor) else
plotpaintbar(h,l,o,c,"",OutsideBar );
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: color bars
re: will the bar update realtime?Aiti,
Thanks for your prompt response, actually... I implemented the solution with this command (just an example):
plotpaintbar(h,l,o,c,"",UpColor) else
plotpaintbar(h,l,o,c,"",OutsideBar );
during the painting of the current bar, as its moving up and down, will the bar update realtime? that is it will be one color, but if the condition changes it will update.. So as the above code would work, it could be UpColor in the beginning, then it can change to Outsidebar if the condition of the current bar changes realtime?
Yes, it will update every tick, and change color accordingly in realtime.
-
- Posts: 186
- Joined: 10 May 2012
- Has thanked: 14 times
- Been thanked: 11 times