Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 22:17:40 +0000



[User Discussion] - Shift by price

View Count: 1566

[2014-07-30 19:47:17]
AndyL - Posts: 119
Hello,

is there an indicator in Sierra where i can shift the prices of an instrument of a chart higher or lower? For example, i have an intraday candlestick chart with realtime data coming in, and i want everything displayed 5 ticks higher.

Best regards,
A.


P.S. this would be useful for example for the SC Fxcm datafeed for index symbols, to adjust for the futures basis.
Date Time Of Last Edit: 2014-07-30 19:49:32
[2014-07-31 23:56:53]
vegasfoster - Posts: 444
I don't think there is, what kind of chart are you using?
[2014-08-01 00:00:42]
AndyL - Posts: 119
vegafoster: all sort of different ones. I got a tick-based, minute-based and also a renko type chart in the chartbooks in question. Additionally, there is the "Round pricebars to tick-size" indicator applied to some of them.

Sounds like this would only be possible with some programming then.
[2014-08-01 05:05:17]
Sierra Chart Engineering - Posts: 104368
We recommend custom programming this, and using the Difference (Bar) study as a reference. Refer to:
https://www.sierrachart.com/index.php?page=doc/doc_BuildCustomStudiesDLL.html
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2014-08-01 05:11:23]
vegasfoster - Posts: 444
Unless someone else knows a better way, I just did a quick proof of concept and I can create a chart to mimic the underlying chart and shift it up or down, but you would no longer see the underlying chart, it would be it's own chart. Or would you rather have it as a separate study that you can overlay on top of the main chart? I think I can do that as well by modifying a canned study, but I haven't looked at it closely, so I may not. In lieu of other ideas, let me know your preference and we can go from there.
Date Time Of Last Edit: 2014-08-01 05:12:55
[2014-08-01 21:30:41]
AndyL - Posts: 119
vega: i wouldn't want to see the underlying chart anyways. Did you use a ascil study for this?
[2014-08-02 17:55:32]
vegasfoster - Posts: 444
I modified Sock Renko bars. I started with this because I have worked with them a lot and could do it relatively quickly. Try it out and if it's not what you want, then I can take a look at doing it the other way, but it may take a few days to get to it.

The only real difference is that with a study you could overlay on a regular chart, but with custom bars like this you would have to add the chart then overlay it on the regular chart, i.e. have 2 charts open. I did add subgraphs for the original OHLC, OHLC Average, HL Average, HLC Average, and OC Average. You can't display them with a custom chart, but you can use them for inputs for other studies, for example you could add an SMA(Original Close, 1) and plot as dash so you could see the original close as a dash line on your shifted chart.

Also, I have NOT tested or validated any of the plots or subgraph calculations, you will need to go through and check everything before using it. Let me know if you see any problems. Put the ChartShift.dll file in your SierraChart/Data folder and press F6>>Add Custom Study>>ChartShift.
attachmentChartShift.dll - Attached On 2014-08-02 17:53:05 UTC - Size: 26 KB - 369 views
attachmentChartShift.cpp - Attached On 2014-08-02 17:53:19 UTC - Size: 5.91 KB - 446 views
[2014-08-02 19:18:13]
AndyL - Posts: 119
Awesome, thanks for the work! I will try it out tomorrow.

Just an idea: wouldnt it be easier to modify "Round pricebars to ticksize"? This study is very similar in that it modifies realtime and historical data. It just needs an additional "Offset" parameter.
[2014-08-03 22:35:34]
AndyL - Posts: 119
vega: i just tried it on my charts. It seems to work fine on minute and tick based charts. It apparently doensnt like renko-charts for some reason, see these 2 images:

Without: http://i.imgur.com/kocfIMZ.png

With study: http://i.imgur.com/caLt5Oe.png

It looks quite different. Any idea how to fix it?

Ragards,
Andy
[2014-08-03 22:46:47]
vegasfoster - Posts: 444
I think I know and can fix it, probably get to it tomorrow.
[2014-08-03 22:52:31]
AndyL - Posts: 119
Nice, thanks.
[2014-08-05 16:51:37]
vegasfoster - Posts: 444
Try this one.
attachmentChartShiftV2.cpp - Attached On 2014-08-05 16:50:51 UTC - Size: 6.25 KB - 430 views
attachmentChartShiftV2.dll - Attached On 2014-08-05 16:51:04 UTC - Size: 26.5 KB - 371 views
[2014-08-05 20:10:01]
AndyL - Posts: 119
It works, thanks a lot!

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account