using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Matriks.Data.Symbol;
using Matriks.Engines;
using Matriks.Lean.Algotrader.AlgoBase;
using Matriks.Lean.Algotrader.Models;
using Matriks.Indicators;
namespace Matriks.Lean.Algotrader
{
public class silbol : Explorer
{
BOLLINGER bollinger;
public override void OnInit()
{
bollinger = BollingerIndicator(Symbol, SymbolPeriod, OHLCType.Close, 20, 2, MovMethod.Simple);
AddColumns(2);
SetColumnText(0, "bol");
SetColumnText(1, "L");
}
public override bool OnExplorer(List<BarDataEventArgs> bardatas)
{
var bardata = bardatas.FirstOrDefault();
var allBarData = GetBarData();
SetColumn(0, Math.Round(bollinger.BollingerDown.CurrentValue, 4));
SetColumn(1, Math.Round(bardata.BarData.Low , 4));
if (bardata.BarData.Low< bollinger.BollingerDown.CurrentValue)
return true;
return false;
}
}
}