protected override void Create() { m_barnumber1 = new BarNumber(this); m_swinglowbar1 = new SwingLowBar(this); m_swinglowbar2 = new SwingLowBar(this); m_swinghighbar1 = new SwingHighBar(this); m_swinghighbar2 = new SwingHighBar(this); m_barnum = new VariableSeries <Double>(this); m_neckswbar = new VariableObject <Int32>(this); m_hnsswbar = new VariableObject <Int32>(this); m_neckswprice = new VariableSeries <Double>(this); m_hnsswprice = new VariableSeries <Double>(this); m_vertorder_hvss = new VariableObject <Boolean>(this); m_vertorder_nvss = new VariableObject <Boolean>(this); m_necklinelimit = new VariableObject <Double>(this); m_maxnecktoheaddist = new VariableObject <Double>(this); m_vertproportion = new VariableObject <Boolean>(this); m_color = new VariableObject <Color>(this); m_confirmbarnum = new VariableObject <Double>(this); m_lastcrossedtl = new VariableObject <int>(this); m_neckswings = new Array2DSimple <Double>(this, 2, 4); m_hnsswings = new Array2DSimple <Double>(this, 3, 5); Plot1 = AddPlot(new PlotAttributes("H&S", EPlotShapes.Point, Color.White, Color.Empty, 4, 0, true)); }
static IEnumerable <Bar> loadBars(IEnumerable <Glyph> glyphs) { State state = new Model.State(); int expectBarNumber = 0; Bar bar = null; foreach (Glyph glyph in glyphs) { //bool isState = state.Add(note); // add to the persistent state glyph.setState(state); if (glyph.newBarNumber != null) { BarNumber barNumber = glyph.newBarNumber; // new Bar assert(barNumber.number == ++expectBarNumber); if (bar != null) { yield return(bar); } bar = new Bar(barNumber, state.Clone()); continue; } if (bar != null) { glyph.setBar(bar); } } yield return(bar); }
protected override void Create() { m_rs_dailydataarray1 = new RS_DailyDataArray(this); m_barnumber1 = new BarNumber(this); m_rs_extremes1 = new RS_Extremes(this); m_rs_average1 = new RS_Average(this); m_rs_average2 = new RS_Average(this); m_rs_average3 = new RS_Average(this); m_index = new VariableObject <Int32>(this); m_qualhi = new VariableSeries <Boolean>(this); m_quallo = new VariableSeries <Boolean>(this); m_oprevhighest = new VariableObject <Double>(this); m_oprevhighestday = new VariableObject <Double>(this); m_oprevlowest = new VariableObject <Double>(this); m_oprevlowestday = new VariableObject <Double>(this); m_revgapup = new VariableObject <Boolean>(this); m_revgapdn = new VariableObject <Boolean>(this); m_dataarray = new Array2DSimple <Double>(this, 13, 101); m_subarray = new ArraySimple <Double>(this, 4); Plot1 = AddPlot(new PlotAttributes("NewHiLo", EPlotShapes.Point, Color.Cyan, Color.Empty, 5, 0, true)); Plot2 = AddPlot(new PlotAttributes("RevGap", EPlotShapes.Point, Color.Yellow, Color.Empty, 2, 0, true)); Plot3 = AddPlot(new PlotAttributes("HiLine", 0, Color.Blue, Color.Empty, 0, 0, true)); Plot4 = AddPlot(new PlotAttributes("LoLine", 0, Color.Magenta, Color.Empty, 0, 0, true)); }
protected override void Create(){ m_rs_dailydataarray1 = new RS_DailyDataArray(this); m_barnumber1 = new BarNumber(this); m_rs_extremes1 = new RS_Extremes(this); m_rs_average1 = new RS_Average(this); m_rs_average2 = new RS_Average(this); m_rs_average3 = new RS_Average(this); m_index = new VariableObject<Int32>(this); m_qualhi = new VariableSeries<Boolean>(this); m_quallo = new VariableSeries<Boolean>(this); m_oprevhighest = new VariableObject<Double>(this); m_oprevhighestday = new VariableObject<Double>(this); m_oprevlowest = new VariableObject<Double>(this); m_oprevlowestday = new VariableObject<Double>(this); m_revgapup = new VariableObject<Boolean>(this); m_revgapdn = new VariableObject<Boolean>(this); m_dataarray = new Array2DSimple<Double>(this, 13, 101); m_subarray = new ArraySimple<Double>(this, 4); Plot1 = AddPlot(new PlotAttributes("NewHiLo", EPlotShapes.Point, Color.Cyan, Color.Empty, 5, 0, true)); Plot2 = AddPlot(new PlotAttributes("RevGap", EPlotShapes.Point, Color.Yellow, Color.Empty, 2, 0, true)); Plot3 = AddPlot(new PlotAttributes("HiLine", 0, Color.Blue, Color.Empty, 0, 0, true)); Plot4 = AddPlot(new PlotAttributes("LoLine", 0, Color.Magenta, Color.Empty, 0, 0, true)); }
protected override void Create() { m_rs_dailydataarray1 = new RS_DailyDataArray(this); m_rs_trueextremes1 = new RS_TrueExtremes(this); m_rs_priceextension1 = new RS_PriceExtension(this); m_rs_reversalpatterns1 = new RS_ReversalPatterns(this); m_barnumber1 = new BarNumber(this); m_value3 = new VariableObject <int>(this); m_index = new VariableObject <Int32>(this); m_prevtrhighest = new VariableObject <Double>(this); m_prevtrlowest = new VariableObject <Double>(this); m_prevatr = new VariableObject <Double>(this); m_osetup = new VariableObject <int>(this); m_otrigger = new VariableObject <Double>(this); m_dataarray = new Array2DSimple <Double>(this, 13, 101); m_subarray = new ArraySimple <Double>(this, 4); Plot1 = AddPlot(new PlotAttributes("Ext", EPlotShapes.Point, Color.Blue, Color.Empty, 3, 0, true)); Plot2 = AddPlot(new PlotAttributes("Setup", EPlotShapes.Point, Color.Yellow, Color.Empty, 4, 0, true)); Plot3 = AddPlot(new PlotAttributes("Trigger", EPlotShapes.Point, Color.Cyan, Color.Empty, 5, 0, true)); Plot4 = AddPlot(new PlotAttributes("HiLoLines", EPlotShapes.Point, Color.Yellow, Color.Empty, 1, 0, true)); }
protected override void Create(){ m_rs_dailydataarray1 = new RS_DailyDataArray(this); m_rs_trueextremes1 = new RS_TrueExtremes(this); m_rs_priceextension1 = new RS_PriceExtension(this); m_rs_reversalpatterns1 = new RS_ReversalPatterns(this); m_barnumber1 = new BarNumber(this); m_value3 = new VariableObject<int>(this); m_index = new VariableObject<Int32>(this); m_prevtrhighest = new VariableObject<Double>(this); m_prevtrlowest = new VariableObject<Double>(this); m_prevatr = new VariableObject<Double>(this); m_osetup = new VariableObject<int>(this); m_otrigger = new VariableObject<Double>(this); m_dataarray = new Array2DSimple<Double>(this, 13, 101); m_subarray = new ArraySimple<Double>(this, 4); Plot1 = AddPlot(new PlotAttributes("Ext", EPlotShapes.Point, Color.Blue, Color.Empty, 3, 0, true)); Plot2 = AddPlot(new PlotAttributes("Setup", EPlotShapes.Point, Color.Yellow, Color.Empty, 4, 0, true)); Plot3 = AddPlot(new PlotAttributes("Trigger", EPlotShapes.Point, Color.Cyan, Color.Empty, 5, 0, true)); Plot4 = AddPlot(new PlotAttributes("HiLoLines", EPlotShapes.Point, Color.Yellow, Color.Empty, 1, 0, true)); }
public IEnumerable <Glyph> readLine(string line) { // empty line if (Format.isEmpty(line)) { assert((nIntervals == nIntervalsPerBar) || (nIntervals == 0)); yield break; } // start of bar if (nIntervals == nIntervalsPerBar) { // end of previous bar so expect new bar now assert(Format.isNewBar(line)); BarNumber barNumber = Format.readNewBar(line); if (!barNumber.likeOther.HasValue) { nIntervals = 0; } // else no content in this bar yield return(barNumber); yield break; } else { assert(!Format.isNewBar(line)); } double time = (double)nIntervals / nIntervalsPerBeat; // notes if (Format.isNotes(line)) { foreach (Note note in Format.readNotes(line, time)) { yield return(note); } ++nIntervals; assert(nIntervals <= nIntervalsPerBar); yield break; } // else chord yield return(new Chord(line, time)); assert(nIntervals < nIntervalsPerBar); }
protected override void Create(){ m_barnumber1 = new BarNumber(this); m_swinghighbar1 = new SwingHighBar(this); m_swinglowbar1 = new SwingLowBar(this); m_dntlref = new VariableSeries<ITrendLineObject>(this); m_dntlendbar = new VariableObject<Int32>(this); m_dntlbreak = new VariableObject<Boolean>(this); m_uptlref = new VariableSeries<ITrendLineObject>(this); m_uptlendbar = new VariableObject<Int32>(this); m_uptlbreak = new VariableObject<Boolean>(this); m_index = new VariableObject<Int32>(this); m_swhitime = new ArraySimple<DateTime>(this, 11); m_swhival = new ArraySimple<Double>(this, 11); m_swlotime = new ArraySimple<DateTime>(this, 11); m_swloval = new ArraySimple<Double>(this, 11); }
protected override void Create() { m_barnumber1 = new BarNumber(this); m_swinghighbar1 = new SwingHighBar(this); m_swinglowbar1 = new SwingLowBar(this); m_dntlref = new VariableSeries <ITrendLineObject>(this); m_dntlendbar = new VariableObject <Int32>(this); m_dntlbreak = new VariableObject <Boolean>(this); m_uptlref = new VariableSeries <ITrendLineObject>(this); m_uptlendbar = new VariableObject <Int32>(this); m_uptlbreak = new VariableObject <Boolean>(this); m_index = new VariableObject <Int32>(this); m_swhitime = new ArraySimple <DateTime>(this, 11); m_swhival = new ArraySimple <Double>(this, 11); m_swlotime = new ArraySimple <DateTime>(this, 11); m_swloval = new ArraySimple <Double>(this, 11); }
protected override void Create(){ m_barnumber1 = new BarNumber(this); m_swinglowbar1 = new SwingLowBar(this); m_swinglowbar2 = new SwingLowBar(this); m_swinghighbar1 = new SwingHighBar(this); m_swinghighbar2 = new SwingHighBar(this); m_barnum = new VariableSeries<Double>(this); m_neckswbar = new VariableObject<Int32>(this); m_hnsswbar = new VariableObject<Int32>(this); m_neckswprice = new VariableSeries<Double>(this); m_hnsswprice = new VariableSeries<Double>(this); m_vertorder_hvss = new VariableObject<Boolean>(this); m_vertorder_nvss = new VariableObject<Boolean>(this); m_necklinelimit = new VariableObject<Double>(this); m_maxnecktoheaddist = new VariableObject<Double>(this); m_vertproportion = new VariableObject<Boolean>(this); m_color = new VariableObject<Color>(this); m_confirmbarnum = new VariableObject<Double>(this); m_lastcrossedtl = new VariableObject<int>(this); m_neckswings = new Array2DSimple<Double>(this, 2, 4); m_hnsswings = new Array2DSimple<Double>(this, 3, 5); Plot1 = AddPlot(new PlotAttributes("H&S", EPlotShapes.Point, Color.White, Color.Empty, 4, 0, true)); }
internal Bar(BarNumber barNumber, State state) { this.barNumber = barNumber; this.state = state; }