Plot custom candlestick data series in new pane
Author: angel57
Creation Date: 9/9/2008 12:44 AM
profile picture

angel57

#1
I would like to create a pseudo-candlestick data series that has the usual OHLC data fields, but the OHLC data are calculated based on other criteria. So I would calculate these new OHLC values for each bar and put them in this newly defined data series. Then I would like to plot these new candlesticks in a new pane above the regular pane showing the normal candlesticks streaming from the datafeed. In other words, 2 panes, pseudo on top, regular on bottom. Then execute the strategy on the pseudo data series. Can you point me to a script example that may have used similar concepts or WL5.1 functions and I will use that as a starting point?
profile picture

Eugene

#2
See WealthScript Guide, Painting the Chart > Charting Multiple Symbols, for the how-to on plotting a synthetic symbol.
profile picture

angel57

#3
Thanks. Is there a new version of the Guide for 5.1 available for download somewhere?
profile picture

angel57

#4
On the regular price pane you can hover your mouse above the candlestick and it pops up the OHLC data for that candle. Is there a similar function in the scripting language that I could use for the synthetic candlesticks, or would I use the DrawText function and have to pass the mouse cursor location to the function for a similar effect?
profile picture

Eugene

#5
QUOTE:
Is there a new version of the Guide for 5.1 available for download somewhere?


For sure, HERE.
profile picture

Eugene

#6
QUOTE:
On the regular price pane you can hover your mouse above the candlestick and it pops up the OHLC data for that candle. Is there a similar function in the scripting language that I could use for the synthetic candlesticks, or would I use the DrawText function and have to pass the mouse cursor location to the function for a similar effect?

I don't think you'll get anywhere with DrawText since WealthScript commands are executed either manually or when a new bar arrives in streaming charts. However it seems like a good idea for Fidelity to implement this feature for PlotSyntheticSymbol. However it could have been disabled intentionally so that one wouldn't take synthetic symbol for actual Bars.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).