Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 08:42:07 +0000



Getting an Indicator value from a few bars back

View Count: 922

[2014-04-17 19:26:49]
Gary Lockwood - Posts: 16
Sorry new programmer here. How do I do this? I'm trying to pull the Bollinger value from a few bars back.

Here is my bollinger code:

// Plot Bollinger Bands 1
  sc.BollingerBands (sc.BaseData[SC_LAST], BollingerAvg1, 100, 1, MOVAVGTYPE_SIMPLE);
  float Avg1 = BollingerAvg1[sc.Index];
  float Upper1 = BollingerAvg1.Arrays[0][sc.Index];
  float Lower1 = BollingerAvg1.Arrays[1][sc.Index];
  BollingerAvg1[sc.Index] = Avg1;
  BollingerUpper1[sc.Index] = Upper1;
  BollingerLower1[sc.Index] = Lower1;


[2014-04-17 19:30:52]
Sierra Chart Engineering - Posts: 104368
This is explained on this page here:
http://www.sierrachart.com/index.php?l=doc/doc_ACS_ArraysAndLooping.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

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

Login

Login Page - Create Account