Login Page - Create Account

Support Board


Date/Time: Sat, 04 May 2024 05:43:57 +0000



Renko bar in ticks; missing arraysize adjustment

View Count: 899

[2016-10-10 14:32:21]
@sstfrederik - Posts: 403
I am working on a strategy that uses a chart with "Renko Bar (in ticks)".

I have noticed that there can be occasions that the sc.Index is adjusted, but the sc.ArraySize is not. I am basing some calculations on the close of the last bar when sc.ArraySize is incremented.


if (PriorArraySize < sc.ArraySize){
SCString aap;
aap.Format("sc.Index = %d, RenkoClose[sc.Index] = %f, LatestLow =%f",sc.Index,RenkoClose[sc.Index],LatestLow);
sc.AddMessageToLog(aap,1);
}
PriorArraySize = sc.ArraySize;


sc.UpdateAlways = 1;

I have some output on a very basic study that shows this. sc.Index is raised from 26371 to 26372 while sc.ArraySize is not incremented.

Am I missing something here?

Thanks for your time.


Chart: Replay 1.0X: GBPUSD [M] Renko 3t #1 | Study: Strategy | sc.Index = 26370, RenkoClose[sc.Index] = 1.240405, PriorArraySize = 26371, sc.ArraySize = 26371 | 2016-10-10 10:08:26 *
Chart: Replay 1.0X: GBPUSD [M] Renko 3t #1 | Study: Strategy | sc.Index = 26370, RenkoClose[sc.Index] = 1.240405, PriorArraySize = 26371, sc.ArraySize = 26371 | 2016-10-10 10:08:26 *
Chart: Replay 1.0X: GBPUSD [M] Renko 3t #1 | Study: Strategy | sc.Index = 26370, RenkoClose[sc.Index] = 1.240600, PriorArraySize = 26371, sc.ArraySize = 26373 | 2016-10-10 10:08:27 *
Chart: Replay 1.0X: GBPUSD [M] Renko 3t #1 | Study: Strategy | sc.Index = 26370, RenkoClose[sc.Index] = 1.240600, LatestLow = 1.240300 | 2016-10-10 10:08:27 *
Chart: Replay 1.0X: GBPUSD [M] Renko 3t #1 | Study: Strategy | sc.Index = 26371, RenkoClose[sc.Index] = 1.240750, PriorArraySize = 26373, sc.ArraySize = 26373 | 2016-10-10 10:08:27 *
Chart: Replay 1.0X: GBPUSD [M] Renko 3t #1 | Study: Strategy | sc.Index = 26372, RenkoClose[sc.Index] = 1.240775, PriorArraySize = 26373, sc.ArraySize = 26373 | 2016-10-10 10:08:27 *
Chart: Replay 1.0X: GBPUSD [M] Renko 3t #1 | Study: Strategy | sc.Index = 26372, RenkoClose[sc.Index] = 1.240775, PriorArraySize = 26373, sc.ArraySize = 26373 | 2016-10-10 10:08:27 *
Chart: Replay 1.0X: GBPUSD [M] Renko 3t #1 | Study: Strategy | sc.Index = 26372, RenkoClose[sc.Index] = 1.240775, PriorArraySize = 26373, sc.ArraySize = 26373 | 2016-10-10 10:08:27 *
Chart: Replay 1.0X: GBPUSD [M] Renko 3t #1 | Study: Strategy | sc.Index = 26372, RenkoClose[sc.Index] = 1.240820, PriorArraySize = 26373, sc.ArraySize = 26373 | 2016-10-10 10:08:28 *
Chart: Replay 1.0X: GBPUSD [M] Renko 3t #1 | Study: Strategy | sc.Index = 26372, RenkoClose[sc.Index] = 1.240820, PriorArraySize = 26373, sc.ArraySize = 26373 | 2016-10-10 10:08:28 *
Chart: Replay 1.0X: GBPUSD [M] Renko 3t #1 | Study: Strategy | sc.Index = 26372, RenkoClose[sc.Index] = 1.240820, PriorArraySize = 26373, sc.ArraySize = 26373 | 2016-10-10 10:08:28 *
Chart: Replay 1.0X: GBPUSD [M] Renko 3t #1 | Study: Strategy | sc.Index = 26372, RenkoClose[sc.Index] = 1.240450, PriorArraySize = 26373, sc.ArraySize = 26374 | 2016-10-10 10:08:29 *
Chart: Replay 1.0X: GBPUSD [M] Renko 3t #1 | Study: Strategy | sc.Index = 26372, RenkoClose[sc.Index] = 1.240450, LatestLow = 1.240300 | 2016-10-10 10:08:29 *
Chart: Replay 1.0X: GBPUSD [M] Renko 3t #1 | Study: Strategy | sc.Index = 26373, RenkoClose[sc.Index] = 1.240370, PriorArraySize = 26374, sc.ArraySize = 26374 | 2016-10-10 10:08:29 *
Chart: Replay 1.0X: GBPUSD [M] Renko 3t #1 | Study: Strategy | sc.Index = 26373, RenkoClose[sc.Index] = 1.240370, PriorArraySize = 26374, sc.ArraySize = 26374 | 2016-10-10 10:08:29 *
[2016-10-10 16:55:52]
Sierra Chart Engineering - Posts: 104368
There must be some misunderstanding.

Refer to:
Working with ACSIL Arrays and Understanding Looping
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
[2016-10-11 12:20:37]
@sstfrederik - Posts: 403
Let me rephrase the question.

Is it normal that sc.ArraySize skips a beat and is raised by two instead of one?

This is whats happening occasionally with the renko bar in ticks chart.

Edit. I guess this happens as price moving fast. Creating more than one bar at once. I guess I will need to check for larger increments of sc.ArraySize than 1.
Date Time Of Last Edit: 2016-10-11 15:22:28
[2016-10-11 17:53:28]
Sierra Chart Engineering - Posts: 104368
Yes that is normal.
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