Skip to content

Commit

Permalink
Fix extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl Wan committed Sep 24, 2017
1 parent 4cd128f commit 1e5cb71
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 10 deletions.
1 change: 0 additions & 1 deletion Trady.Analysis/Backtest/Runner.cs
Expand Up @@ -3,7 +3,6 @@
using System.Linq;
using System.Linq.Expressions;
using System.Threading.Tasks;
using Trady.Analysis.Helper;
using Trady.Core;
using Trady.Core.Infrastructure;

Expand Down
1 change: 0 additions & 1 deletion Trady.Analysis/Candlestick/LongDay.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Trady.Analysis.Helper;
using Trady.Analysis.Infrastructure;
using Trady.Core;

Expand Down
1 change: 0 additions & 1 deletion Trady.Analysis/Candlestick/LongLowerShadow.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Trady.Analysis.Helper;
using Trady.Analysis.Indicator;
using Trady.Analysis.Infrastructure;
using Trady.Core;
Expand Down
1 change: 0 additions & 1 deletion Trady.Analysis/Candlestick/LongUpperShadow.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Trady.Analysis.Helper;
using Trady.Analysis.Infrastructure;
using Trady.Core;

Expand Down
1 change: 0 additions & 1 deletion Trady.Analysis/Candlestick/ShortDay.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Trady.Analysis.Helper;
using Trady.Analysis.Infrastructure;
using Trady.Core;

Expand Down
2 changes: 1 addition & 1 deletion Trady.Analysis/Extension/CandlesExtension.cs
Expand Up @@ -42,7 +42,7 @@ public static IReadOnlyList<AnalyzableTick<(decimal? Up, decimal? Down)>> Aroon(
public static IReadOnlyList<AnalyzableTick<decimal?>> AroonOsc(this IEnumerable<Candle> candles, int periodCount, int? startIndex = null, int? endIndex = null)
=> new AroonOscillator(candles, periodCount).Compute(startIndex, endIndex);

public static IReadOnlyList<AnalyzableTick<decimal?>> Adx(IEnumerable<Candle> candles, int periodCount, int? startIndex = null, int? endIndex = null)
public static IReadOnlyList<AnalyzableTick<decimal?>> Adx(this IEnumerable<Candle> candles, int periodCount, int? startIndex = null, int? endIndex = null)
=> new AverageDirectionalIndex(candles, periodCount).Compute(startIndex, endIndex);

public static IReadOnlyList<AnalyzableTick<decimal?>> Adxr(this IEnumerable<Candle> candles, int periodCount, int adxrPeriodCount, int? startIndex = null, int? endIndex = null)
Expand Down
Expand Up @@ -3,9 +3,9 @@
using System.Collections.Generic;
using System.Linq;

namespace Trady.Analysis.Helper
namespace Trady.Analysis
{
internal static class GenericHelper
internal static class TypeExtension
{
public static int? FindIndexOrDefault<T>(this IEnumerable<T> list, Predicate<T> predicate, int? defaultValue = null)
{
Expand Down
1 change: 0 additions & 1 deletion Trady.Analysis/Indicator/Aroon.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Trady.Analysis.Helper;
using Trady.Analysis.Infrastructure;
using Trady.Core;

Expand Down
2 changes: 1 addition & 1 deletion Trady.Test/IndicatorTest.cs
Expand Up @@ -267,7 +267,7 @@ public async Task TestIchimokuCloudAsync()
{
var candles = await ImportCandlesAsync();
int middlePeriodCount = 26;
var results = candles.Ichimoku(0, middlePeriodCount, 52);
var results = candles.Ichimoku(9, middlePeriodCount, 52);

var currResult = results.ElementAt(results.Count() - middlePeriodCount - 1);
Assert.IsTrue(171.67m.IsApproximatelyEquals(currResult.Tick.ConversionLine.Value));
Expand Down

0 comments on commit 1e5cb71

Please sign in to comment.