I'm struggling find this solution.
This works...
Code: Select all
double[] m_Array = new double[34];
for ( int I = 0; I < 34; I++ )
m_Array[I] = [ SOME CODE ];
Any suggestions?
Code: Select all
double[] m_Array = new double[34];
for ( int I = 0; I < 34; I++ )
m_Array[I] = [ SOME CODE ];
Code: Select all
using System;
using System.Drawing;
using System.Linq;
using PowerLanguage.Function;
namespace PowerLanguage.Indicator
{
public class ScriptGlobalVariable : IndicatorObject
{
private double[] m_Array = new double[34];
public ScriptGlobalVariable(object _ctx) : base(_ctx) { }
protected override void Create()
{
Output.WriteLine("From Create(): Length of array: {0}", m_Array.Length);
}
protected override void StartCalc()
{
Output.WriteLine("From StartCalc(): Length of array: {0}", m_Array.Length);
}
protected override void CalcBar()
{
if (Bars.CurrentBar < 10)
{
Output.WriteLine("From CalcBar(): Length of array: {0}", m_Array.Length);
}
}
}
}
Code: Select all
private double[] m_Wave = new double[56];
for ( int I = 0; I < Counter && I < 55; I++ )
m_Wave[I] = Value_Sum_Wave;
Code: Select all
if ( Bars.Status == EBarState.Close )
for ( int I = 0; I < 55; I++ )
m_Wave[ 55 - I ] = m_Wave[ 55 - I - 1 ];
Code: Select all
double Lowest_Wave_Sum = new[] { m_Wave.Min(), m_Wave_Zigzag.Min() }.Min();
for ( I = 0; I < 55; I++ )
p_PlotObject.Set( I, Lowest_Wave_Sum [ "+" / "-" ] m_Value[I], Color.Empty, 0 );