Closed OutOfThisPlanet closed 1 year ago
$price.color = barColour
to set the bar color in aggr script
is the for aggr ? if yes how to add to aggr thx mate :)
Script it correct, but the colors aren't printing the same as the TV script
Fixed it, was (vbuy+vsell) not (vbuy-vsell).
high = $price.high
low = $price.low
close = $price.close
open = $price.open
volume = (vbuy+vsell)
averageVolume = sum(volume[1], 10)/10.0
volumeSpread = volume*(high - low)
highestVolumeSpread = highest(volumeSpread[1], 10)
color =
(
(volume >= 2*averageVolume || volumeSpread >= highestVolumeSpread) ?
(close > open ? options.greenVectorColor : options.redVectorColor) :
(volume >= 1.5*averageVolume) ?
(close > open ? options.blueVectorColor : options.violetVectorColor) :
(close > open ? options.regularCandleUpColor : options.regularCandleDownColor)
)
histogram({
time: time,
value: volume < 0 ? Math.abs(volume) : volume,
color: color
})
$price.color = color
@Tucsky when I modify the $price.color
via indicator, the current candle doesn't use the correct color
Latest candles don't get updated with the color from the indicator
Only way I've found is to open the Indicator and save it, causes the candle colors to repopulate
Already has the colors setup for you.
Hi @lmvdz,
I have tried to import your indicator to aggr.trade
and I get this error:
Is that normal ?
How do you set this up... do you have to self-host?
Click the Add
button by indicators
Click Import in bottom left
Select the indicator_pvsra.txt
you downloaded.
Make sure your Price
indicator has the name price
Open the PVSRA indicator you added, and press Save. This will update the color of the bars to reflect the volume.
Will need to wait for word from @Tucsky about how to get the price bar colors to update automatically.
This is truly awesome work, @lmvdz
Thanks so much!
Hello all,
It seems an unidentified issue prevents the chart to update bar charts colors unless you edit and save the indicator which forces repainting candles.
You might have to file a separate bug report. Let's see what @Tucsky think about that.
@lmvdz
This is whats happening and why the candle color isn't the one from the PVSRA indi for realtime bars :
Every refreshRate (which can go as many as your monitor's hz) it does the following
For example with price and PVSRA indi on
To fix that issue we have to separate the script processing & rendering
More loops needed and unfortunately more memory footprint, idk how I feel about that yet but it's live on https://tucsky.github.io/aggr
This is awesome :)
So many thanks, folks! :)
I'm not sure if it would be easy to implement, however, I would love to see "Vector Candles" supported in the interface.
Examples in this tradingview screenshot, using the indicator called TR_MAIN (Trader's Reality): There are also volume vectors in this screenshot, using the indicator PVSRA_VS.
In the above image, the Vector Candles are the Green, Blue, Red, and Violet candles, and are used to show market-maker manipulation.
I became aware of this indicator via the youtube channel Traders Reality, and my trading has improved tenfold since using that strategy.
For more information, check this video :)
https://www.youtube.com/watch?v=Kwhnj80Qvn8