Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 08:27:32 +0000



Post From: Getting an Indicator value from a few bars back

[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;