Login Page - Create Account

Support Board


Date/Time: Sat, 18 Jan 2025 05:16:21 +0000



[Programming Help] - SC_RENKO_CLOSE sometimes return zero

View Count: 791

[2018-01-31 04:02:51]
User841591 - Posts: 42
I get the close price as the code below and use (sc.GetBarHasClosedStatus() == BHCS_BAR_HAS_CLOSED && BuyTiggerLogic) to trigger the buy order. I sometimes find the NewOrder.Price1 get zero value and sometimes is correct. Pls advise how I can fix it.

SCFloatArrayRef R_Close = sc.BaseData[SC_RENKO_CLOSE];
NewOrder.Price1=sc.RoundToTickSize(R_Close[sc.Index]-sc.TickSize);
int Result = sc.BuyEntry(NewOrder);
[2018-01-31 04:15:53]
Sierra Chart Engineering - Posts: 104368
The first thing we want you to do is to update to the current version of Sierra Chart following these instructions:
Software Download: Fast Update

We would not expect this to be a problem.
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
[2018-01-31 05:13:06]
User841591 - Posts: 42
I am using version 1674
[2018-01-31 05:23:31]
Sierra Chart Engineering - Posts: 104368
We told you to update to the current version and we expect you to do that.
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
[2018-01-31 09:16:59]
User841591 - Posts: 42
I have updated the current version but problem still happen
[2018-01-31 23:44:11]
Sierra Chart Engineering - Posts: 104368
The only known case where these values can be 0 is only on a new bar for the day when using Aligned Renko bars.

If you are seeing this with prior bars, there must be something wrong in your code. And you can verify this is by using the Chart Values tool and looking at what these values are for each bar at any moment. Refer to:
Renko Bar Charts: Renko Open, High, Low, Close Values


When they are 0 you need to alternatively use SC_LAST instead.
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

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

Login

Login Page - Create Account