I need help with:
When I attempt to compile, I get an error message saying sumBarPrice is already defined
Also, I would like to draw the number on the chart somewhere in the right top corner fixed... something like 'DrawTextFixed(string tag, string text, TextPosition textPosition)' but I am unsure of how to implement this this
Any help is greatly appreciated!
This is what I have so far using a for loop
namespace NinjaTrader.Indicator { public class NewStrategy101 : Indicator { #region Variables int sumBarPrice = 0; #endregion protected override void Initialize() { CalculateOnBarClose = true; for (int barsAgo = 0; barsAgo < 200; barsAgo++) { sumBarPrice = sumBarPrice + Input[barsAgo]; } } protected override void OnBarUpdate() { } #region Properties public int sumBarPrice { get { return sumBarPrice; } set { sumBarPrice = Math.Max(1, value); } } #endregion } }
Comment