Merhaba, IQ için SuperSmoothedMACD ile bir explorer yazmaya çalıştım ama başaramadım. kod yazma konusunda tecrübem yok ama diğer explorerlar üzerinden mantık yürüterek bir şeyler yapmaya çalıştım. Explorer ilk etapta çalıştı ama sonuç vermedi. Sonradan yaptığım denemelerde ise hata vermeye başladı. Doğru explorer'ı yazabilir misiniz? ya da bendeki hataları söyleyebilir misiniz? Teşekkürler.
bir küçük ekleme de yaparsanız sevinirim. Alış mı? sorusuna cevap verebileyim aynı MOSTIQExp Explorer'ında olduğu gibi.
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 SuperSmoothedMACDExp : Explorer
{
[Parameter(8)]
public int SupersmoothedmacdShortPeriod1;
[Parameter(13)]
public int SupersmoothedmacdLongPeriod1;
[Parameter(5)]
public int SupersmoothedmacdSmoothPeriod1;
SuperSmoothedMACD superSmoothedMACD;
public override void OnInit()
{
superSmoothedMACD = SuperSmoothedMACDIndicator(Symbol, SymbolPeriod, OHLCType.Close, 8, 13, 5);
AddColumns(2);
SetColumnText(0, "SuperSmootherFr");
SetColumnText(1, " SuperSmootherFilt");
}
public override bool OnExplorer(List<BarDataEventArgs> bardatas)
{
var barDataModel = GetBarData();
var close = bardatas.FirstOrDefault().BarData.Close;
SetColumn(0, Math.Round(close, 4));
SetColumn(1, Math.Round(superSmoothedMACD.CurrentValue, 4));
if (CrossAbove(barDataModel, superSmoothedMACD, OHLCType.Close))
return true;
return false;
}
}
}

