Disappearing candlestick shadows

Questions about MultiCharts and user contributed studies.
janus
Posts: 763
Joined: 25 May 2009
Has thanked: 43 times
Been thanked: 86 times

Disappearing candlestick shadows

Postby janus » 09 Jun 2009

I have a problem overlaying a candlestick plot generated by a combination of plot1, plot2, plot3 and plot4 over a bar chart generated by plot5 and plot6. One has to make sure the plot types for these are respectively: Bar High, Bar Low, Left Tick, Right Tick, Bar High and Bar Low. I also set the thickness of the bars formed by plot5 and plot6 to 9. What I see is the shadows of the candlesticks (aka the tails) disappear behind the bar chart but the bodies are in front. This is despite making sure I plot the bar plot first prior to the candlestick plot, although it doesn't appear to make any difference. Is there something else I need to do, or is this a bug? The study is shown below.

variables:
colorc(darkgreen), myh(0), myl(0), myo(0), myc(0), intrabarpersist nb(0);

if nb = 0 then myh = 3500;
if currentbar > nb then begin
nb = currentbar;
myh = myh+5;
myl = myh-20;
myo = myl+5;
myc = myh-5;
end;
//PlotPaintBar(myh,myl,myo,myc,"",colorc,default,1);
plot5(3700,"High2",cyan,default,9);
plot6(3500,"Low2",cyan,default,9);
plot1(myh,"High",colorc);
plot2(myl,"Low",colorc);
plot3(myo,"Open",colorc);
plot4(myc,"Close",colorc);

User avatar
TJ
Posts: 7132
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 987 times
Been thanked: 2038 times

Postby TJ » 09 Jun 2009

I believe MC paints the plots numerically

it will paint plot1 first, plot2 second... etc.


i.e. MC does not paint according to the plot placement in the code.


note: this is my observation only

janus
Posts: 763
Joined: 25 May 2009
Has thanked: 43 times
Been thanked: 86 times

Postby janus » 09 Jun 2009

If that were the case, then my plot5/6 bar chart should hide all of the candlesticks, not just the shadows. Something strange is going on instead.

User avatar
TJ
Posts: 7132
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 987 times
Been thanked: 2038 times

Postby TJ » 09 Jun 2009

can you post a screen shot?

janus
Posts: 763
Joined: 25 May 2009
Has thanked: 43 times
Been thanked: 86 times

Postby janus » 09 Jun 2009

can you post a screen shot?


Sure can. Here it is...
Attachments
picture1.png
picture1.png (3.5 KiB) Viewed 448 times

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 17 Jun 2009

Hi Janus,

This is a bug that will be fixed in MC 5.5.

Regards.

janus
Posts: 763
Joined: 25 May 2009
Has thanked: 43 times
Been thanked: 86 times

Postby janus » 17 Jun 2009

Thanks Marina. Which way will it be fixed? Will the whole candle be on top or the bars will be on top? What would be nice is one could select the order from withing the study. In other words, the plotn function has an option that says "infront" or "behind"; where "infront" means plot the indicator in front of anything else and "behind" means it plots it behind anything else. Failing this, the default option is it plots behind. That way, the PlotPaintBar candlestick like indicator will always be in front since that would be typically the first one plotted in a study. However, as I understand it, the current behavior is all subsequent plots are in front. SO, another approach is to make an exception for PlotPainBar and make sure that one is always in front. The same must be done if one uses plot1,2,3,4 combination (to display custom the labels in the hint window). A far better approach is to create a synthetic symbol from a study and treat that as if it's being sourced from the database. That way, one could set the properties of the indicator similar to a normal symbol, such as chart type. Some properties would not be relevant so they can be grayed out.


Return to “MultiCharts”