MRB
yardımcı olduğunuz kodda hata alıyorum yardımcı olur musunuz tşk.
kod :
using System; using System.Collections.Generic; using System.Linq; using Matriks.Data.Symbol; using Matriks.Engines; using Matriks.Indicators; using Matriks.Symbols; using Matriks.Trader.Core; using Matriks.Trader.Core.Fields; using Matriks.Lean.Algotrader.AlgoBase; using Matriks.Lean.Algotrader.Models; using Matriks.Lean.Algotrader.Trading; using Matriks.AI; using Matriks.AI.AiParameters; using Matriks.AI.Data; using Matriks.Trader.Core.TraderModels; using System.Net; using System.IO; using System.Text; namespace Matriks.Lean.Algotrader { public class TelegramBot { static readonly string token = "1674939781"; static readonly string chatId = "@123456"; // public static string SendMessage(string message) { string retval = string.Empty; string url = $"; using (var webClient = new WebClient()) { retval = webClient.DownloadString(url); } return retval; } } public class SablonTelegramExplorer : Explorer { [Parameter(3)] public int MavilimwFirstMovPeriod1; [Parameter(5)] public int MavilimwSecondMovPeriod1; MAVILIMW mavilimw; static StringBuilder veri = new StringBuilder(); static object locker = new object(); public override void OnInit() { mavilimw = MAVILIMWIndicator(Symbol, SymbolPeriod, MavilimwFirstMovPeriod1, MavilimwSecondMovPeriod1); } public override bool OnExplorer(List<BarDataEventArgs> bardatas) { bool sonuc = false; var barData1 = GetBarData(Symbol, SymbolPeriod); var close = GetSelectedValueFromBarData(barData1, OHLCType.Close); if (CrossAbove(barData1, mavilimw, OHLCType.Close, 0)) { sonuc = true; lock (locker) { veri.AppendLine(Symbol + "|" + "Buy" + "|" + close); } } return sonuc; } public override void OnExplorerFinished() { if (veri.Length>0) { TelegramBot.SendMessage(veri.ToString()); } } } }