Login Page - Create Account

Support Board


Date/Time: Thu, 28 Nov 2024 15:39:27 +0000



[Programming Help] - Weird issue with spreadsheet BARS

View Count: 371

[2023-04-20 17:59:24]
TopGunTrader - Posts: 172
Hi,

I want to place stocks side by side and see a relative strength between them and which way they're moving from this 5m bar's open. I coded up a normalized bar that looks pretty good HOWEVER many bars just do NOT show up.

I've attached screenshot and a ONE chart test workspace. Seems 10% of the bars don't show up for some odd reason.
imageCapture.PNG / V - Attached On 2023-04-20 17:58:12 UTC - Size: 48.29 KB - 76 views
attachmentTestWorkspace.Cht - Attached On 2023-04-20 17:58:24 UTC - Size: 3.99 KB - 135 views
[2023-04-20 18:00:23]
TopGunTrader - Posts: 172
I took equivolume bars off and put regular candle and same issue.
[2023-04-20 21:09:55]
John - SC Support - Posts: 36350
That means that there was no trading at that time for that product. Also, keep in mind that with the NASDAQ TotalView data, you are only seeing the trading that occurs on the NASDAQ for any particular stock, so it could be that the one that does not show many bars is not traded heavily on the NASDAQ but could be elsewhere.

We do have the U.S. Equities Consolidated Tape exchange now available, but it only has NASDAQ stocks right now, we are adding NYSE and AMEX, and expect to have the NYSE early next week. This exchange does have the full volumes from all exchanges for a product, but it does not have the Market Depth data. Depending on the stock(s) you are viewing, this might be the better exchange option for you.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-04-21 10:31:04]
TopGunTrader - Posts: 172
Hi,

Thank you for the response however I'm very confused! The top chart is plotting movement and volume, I doubt there is a second that Apple doesn't trade at all and certainly not for 20 seconds.

The top candle is printing like normal and I've verified its accuracy with another data feed/trading platform.

But taking that data and using spreadsheet bars below there are some bars not showing up. I can't see how this isn't a bug or some setting I don't have checked. All I'm doing is normalizing the bars so ANY movement on top WILL cause movement below. It's not just wrong NOTHING shows up on some bars even for BIG moves on stock candle above.

Can you please run this chart and see for yourself, something is wrong and the code is as simple as it can get.

High of bar is 10000*((H-5m OP)/5mOP) I didn't want fractions below so kept adding a 0 till I got whole numbers for scale.

Here's pic of the S&P futures and notice when I add this study on PAST data there are many bars NOT showing on the bottom. I really like this study concept and see it having real benefit to my trading but can't use it till it works perfectly and its missing many bars. Please help me figure out what I did wrong or if its a bug try to fix it.
imageHistorical.png / V - Attached On 2023-04-21 10:30:37 UTC - Size: 87.03 KB - 71 views
[2023-04-21 10:33:56]
TopGunTrader - Posts: 172
I left it running and live bars aren't showing up and at other times not drawing the high/low correctly all t his does is normalize price the candles should look identical.
imageLive.png / V - Attached On 2023-04-21 10:33:52 UTC - Size: 28.41 KB - 76 views
[2023-04-21 10:37:31]
TopGunTrader - Posts: 172
Here's simple workspace if you can spare some time to try to fix this or see yourself on any symbol many bars just don't show up. It's bizarre.
attachmentTestWorkspace.Cht - Attached On 2023-04-21 10:36:29 UTC - Size: 3.83 KB - 180 views
[2023-04-21 12:18:46]
Sawtooth - Posts: 4120
Add the Spreadsheet Study study, then look in columns AA-AD.

You'll notice that the missing bars occur when the formulas return 0.
[2023-04-21 12:52:51]
TopGunTrader - Posts: 172
Hi,

I did put spreadsheet study on and it on bar that's wrong has open 0, high 18.07, low 0, last 18.07 so it should have drawn a candle up with open and low at 0 and high and close at 18.07 but it didn't.

Attaching pics.
image1.png / V - Attached On 2023-04-21 12:52:34 UTC - Size: 67.84 KB - 75 views
image2.png / V - Attached On 2023-04-21 12:52:38 UTC - Size: 198.9 KB - 78 views
[2023-04-21 13:00:33]
TopGunTrader - Posts: 172
I shrunk the empty columns so candles and aa-ad are all visible two examples where open and/or low is 0 it doesn't work.
[2023-04-21 13:00:57]
TopGunTrader - Posts: 172
Sorry here is file forgot to attach.
imageexample2.png / V - Attached On 2023-04-21 13:00:47 UTC - Size: 141.98 KB - 73 views
[2023-04-21 13:02:47]
TopGunTrader - Posts: 172
The problem appears to be that when the value of OPEN or LOW is 0 it does NOT plot but it should in my opinion.
imageexample3.png / V - Attached On 2023-04-21 13:02:44 UTC - Size: 147.47 KB - 66 views
[2023-04-21 13:05:27]
TopGunTrader - Posts: 172
If the open or close is a 0 ZERO it won't plot at all and it also does not plot the wick if its a 0 value!
Date Time Of Last Edit: 2023-04-21 13:06:05
imageexample5.png / V - Attached On 2023-04-21 13:05:19 UTC - Size: 24.9 KB - 70 views
[2023-04-21 13:18:57]
TopGunTrader - Posts: 172
Just a theory but as a light coder in vb and c++ its possible to make program run without crashing there is code to prevent divide by 0 crashes in the code that PLOTS the values. It won't plot a 0, can't understand how this could happen otherwise.
[2023-04-21 13:19:08]
Sierra_Chart Engineering - Posts: 17201
If you are using a Spreadsheet study, then refer to this Input:
Spreadsheet Study Inputs: Draw Zero Values
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, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2023-04-21 13:51:16]
Sawtooth - Posts: 4120
The Spreadsheet Formula (Bar) study does not have an option to draw zeros.

Use these formulas as a workaround:
=IF((O-ID2.SG1)/ID2.SG1=0,0.0000001,100000*((O-ID2.SG1)/ID2.SG1))
=IF((H-ID2.SG1)/ID2.SG1=0,0.0000001,100000*((H-ID2.SG1)/ID2.SG1))
=IF((L-ID2.SG1)/ID2.SG1=0,0.0000001,100000*((L-ID2.SG1)/ID2.SG1))
=IF((C-ID2.SG1)/ID2.SG1=0,0.0000001,100000*((C-ID2.SG1)/ID2.SG1))
[2023-04-21 14:02:17]
TopGunTrader - Posts: 172
Thank you guys SO MUCH! I appreciate this more than you can imagine as from all the things I've tested this shows great promise to help keep me on right side of the trade and as a timing tool.

Working now!!
[2023-04-21 18:28:24]
Sierra_Chart Engineering - Posts: 17201
The Spreadsheet Formula (Bar) study does not have an option to draw zeros.
We will add this.
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, use the Teton service:
Sierra Chart Teton Futures Order Routing

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

Login

Login Page - Create Account