Is there a way to hide the currently active candle? I only want to see completed candle formations so for instance on a 30 minute chart I don’t care for where price is at or what the currently forming candle looks like. The most current price is too distracting so I only want to act on the completed structure and not randomly flapping distraction at the end of the chart.
Thanks.
// Body Candle | Indicator
// 09/02/2019 (Release 1.0)
// Swapping @ www.forexswap.fr
// Sharing ProRealTime knowledge (alt+16)
// --- property setting
//Alpha = 255 (body transparency)
// --- end
if open > close then
DrawCandle(high,open,close,low) coloured(250,0,0,alpha) bordercolor(0,0,0) // Candle Red
else
DrawCandle(high,open,close,low) coloured(0,250,0,alpha) bordercolor(0,0,0) // Candle Green
endif
return
Hello Grantx
Yes, here is a code that answers your request
Setting Alpha to 0, the 4th (optional) colour parameter called fade or transparency, will make objects invisible.
You can use it also for background colours.
You also need to add
DEFPARAM DrawOnLastBarOnly=true
to make previous candles visible.
Hi Roberto
This code for making current candle completely invisible does not seem to work. I have a dark background. Would you be able to post a full code that can achieve this. Only current candle invisible, rest of the candles show
thanks
PJ
This was intended for the current candle only.
To apply it to the whole chart, simply remove the line DEFPARAM DrawOnLastBarOnly=true.
removing the line DEFPARAM DrawOnLastBarOnly=true. fades the entire chart – border colour still. But I want the current candle to be invisible and to show all closed candles.
When i hide price, everything is gone. When i dont, nothing happens. Could you please try in your end. Just the current bar needs to go rest can remain
JSParticipant
Senior
Try this one…
DefParam DrawOnLastBarOnly=True
If Open>=Close or Open<=Close then
DrawCandle(Open,High,Low,Close) Coloured(0,0,0,255) BorderColor(0,0,0,255)
EndIf
Return
thanks. it does work however, the background is not totally black so it does not hide the current candle but makes it black which is totally visible.
JSParticipant
Senior
I know the problem; it works perfectly with a white background but with a black background it is more difficult. The background and the candle must be exactly the same color, you can adjust this a little bit in the “setup”…
Yes, its very difficult to achieve same background colour and candle colour. Not sure if there is any solution.
Even if its shows a faint candle, its does not achieve the purpose.
This code:
DEFPARAM DrawOnLastBarOnly = true
DrawCandle(high,high,low,low) coloured(0,0,0,255)
return
will make your chart as #3 (in my pic).