"E7 BBKG NumSharp Sample" logosu
cBot
231 i̇ndirmeler
Sürüm 1.0, Feb 2025
Windows, Mac, Mobile, Web
"E7 BBKG NumSharp Sample" yüklenen resmi
Başlangıç 18/12/2024
2
Satışlar
4.1K
Ücretsiz yüklemeler

Birçoğunuzun talebi üzerine, şimdi makine öğrenimi kodlarımızdan ve paketlerimizden bazı örnekler sunmak için yoğun bir şekilde çalışıyoruz.

TensorFlow, PyTorch, Keras, Numpy, Pandas ve cTrader içinde kullanmaya başlamak için daha birçok .NET paketi.

Misyonumuz, cTrader içinde Makine Öğrenimini herkes için daha kolay hale getirmektir.

İyi avlar!

*** Bu kod herhangi bir işlem yapmaz (sadece veri yazdırır vb.). Makine Öğrenimi paketlerimizi kullanarak kendi AI modellerinizi nasıl oluşturabileceğinize dair basit bir örnek koddur.

.......................................................

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cAlgo.API;
using cAlgo.API.Collections;
using cAlgo.API.Indicators;
using cAlgo.API.Internals;

using NumSharp;
using np = NumSharp.np;
using Shape = NumSharp.Shape;

using PandasNet;
using static PandasNet.PandasApi;

namespace cAlgo.Robots
{
    [Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
    public class E7BBKGNumSharpSample : Robot
    {
        [Parameter("Version 1.01", DefaultValue = "Version 1.01")]
        public string Version { get; set; }

        [Parameter("Source")]
        public DataSeries Source { get; set; }

        [Parameter("Bars Required", DefaultValue = 50, MinValue = 1, MaxValue = 10000, Step = 1)]
        public int BarsRequired { get; set; }

        [Parameter("Method Name", DefaultValue = MethodName.DataSplitPrints)]
        public MethodName Mode { get; set; }
        public enum MethodName
        {
            DataSplitPrints,
            PandasPrints,
            NDArrayPrints
        }
        
        protected override void OnStart()
        {
            // Herhangi bir göstergeleri başlat
        }

        protected override void OnBar()
        {
            try
            {
                if (Mode == MethodName.DataSplitPrints)
                {
                    DataSplitPrints();
                }
                else if (Mode == MethodName.PandasPrints)
                {
                    PandasPrints();
                }
                else if (Mode == MethodName.NDArrayPrints)
                {
                    NDArrayPrints();
                }
            }
            catch (Exception ex)
            {
                Print($"Hata: {ex.Message}");
                if (ex.InnerException != null)
                {
                    Print($"İç Hata: {ex.InnerException.Message}");
                    throw;
                }
            }
        }

        private float[,] GetDataSet()
        {
            int startBar = Bars.ClosePrices.Count - BarsRequired;
            float[,] inputSignals = new float[BarsRequired, 5];

            for (int i = 0; i < BarsRequired; i++)
            {
                int barIndex = startBar + i;
                inputSignals[i, 0] = (float)Bars.OpenPrices[barIndex];
                inputSignals[i, 1] = (float)Bars.HighPrices[barIndex];
                inputSignals[i, 2] = (float)Bars.LowPrices[barIndex];
                inputSignals[i, 3] = (float)Bars.ClosePrices[barIndex];
                inputSignals[i, 4] = (float)Bars.TickVolumes[barIndex];
            }
            return inputSignals;
        }
        
        private float[,] GetTargetDataSet()
        {
            int startBar = Bars.ClosePrices.Count - BarsRequired;
            float[,] inputSignals = new float[BarsRequired, 5];

            for (int i = 0; i < BarsRequired; i++)
            {
                int barIndex = startBar + i;
                inputSignals[i, 0] = (float)Bars.OpenPrices[barIndex];
                inputSignals[i, 1] = (float)Bars.HighPrices[barIndex];
                inputSignals[i, 2] = (float)Bars.LowPrices[barIndex];
                inputSignals[i, 3] = (float)Bars.ClosePrices[barIndex];
                inputSignals[i, 4] = (float)Bars.TickVolumes[barIndex];
            }
            return inputSignals;
        }
        
        /// NumSharp Veri Bölme Yazdırmaları
        public void DataSplitPrints()
        {
            // Modelin beklediği giriş şekline uyacak şekilde giriş verisini yeniden şekillendir
            //var inputShape = new Shape(-1, BarsRequired, 5);
            NDArray inputData = np.array<float>(GetDataSet());
            Print("Giriş NDarray: " + string.Join(", ", inputData));
            
            // Modelin beklediği hedef şekline uyacak şekilde hedef verisini yeniden şekillendir
            //var targetShape = new Shape(-1, 5);
            NDArray targetData = np.array<float>(GetTargetDataSet());
            Print("Hedef NDarray: " + string.Join(", ", targetData));
            
            // Veriyi eğitim ve test setlerine ayır
            int testSize = (int)(0.2 * inputData.shape[0]); // Test için %20
            var (x_train, x_test) = (inputData[$":{inputData.shape[0] - testSize}"], inputData[$"{inputData.shape[0] - testSize}:"]);
            var (y_train, y_test) = (targetData[$":{targetData.shape[0] - testSize}"], targetData[$"{targetData.shape[0] - testSize}:"]);
            
            Print("X_train verisi: " + string.Join(", ", x_train));
            Print("X_test verisi: " + string.Join(", ", x_test));
            Print("Y_train verisi: " + string.Join(", ", y_train));
            Print("Y_test verisi: " + string.Join(", ", y_test));
        }
        
        /// PandasNet Yazdırmaları
        public void PandasPrints()
        {
            // float[,] tipini List<Series> tipine dönüştür
            var inputData = GetDataSet();
            var targetData = GetTargetDataSet();
            
            var inputSeriesList = new List<Series>();
            var targetSeriesList = new List<Series>();
            
            for (int col = 0; col < inputData.GetLength(1); col++)
            {
                List<float> columnData = new List<float>();
                for (int row = 0; row < inputData.GetLength(0); row++)
                {
                    columnData.Add(inputData[row, col]);
                }
                inputSeriesList.Add(new Series(columnData.ToArray()));
            }
            
            for (int col = 0; col < targetData.GetLength(1); col++)
            {
                List<float> columnData = new List<float>();
                for (int row = 0; row < targetData.GetLength(0); row++)
                {
                    columnData.Add(targetData[row, col]);
                }
                targetSeriesList.Add(new Series(columnData.ToArray()));
            }
            
            // DataFrame'ler oluştur
            DataFrame inputDataFrame = new DataFrame(inputSeriesList);
            DataFrame targetDataFrame = new DataFrame(targetSeriesList);
            
            Print("Giriş DataFrame: " + inputDataFrame);
            Print("Hedef DataFrame: " + targetDataFrame);
            
            //Print("Giriş DataFrame: " + string.Join(", ", inputDataFrame));
            //Print("Hedef DataFrame: " + string.Join(", ", targetDataFrame));
        }
        
        /// Basit NumSharp NDArrays Yazdırmaları
        public void NDArrayPrints()
        {
            if (Bars.ClosePrices.Count < BarsRequired)
                return;

            try
            {
                // Giriş Verinizi çağırma float[,]
                float[,] inputData = GetDataSet();

                // NDArray'a dönüştür ve (BarsRequired, 5) şekline getir
                NDArray inputNDArray = np.array(inputData);   // NumSharp
                Print("Giriş NumSharp NDarray Verisi : " + string.Join(", ", inputNDArray));
                Print("Giriş NumSharp NDarray Şekli: " + string.Join(", ", inputNDArray.shape));
                
                int expectedLength = BarsRequired * 5;
                Print($"Beklenen NumSharp NDarray Uzunluğu: {expectedLength}");
                Print($"Giriş NumSharp NDarray Boyutu: {inputNDArray.size}");

                if (inputNDArray.size != expectedLength)
                {
                    Print($"Uzunluk Uyumsuzluğu: Beklenen Uzunluk {expectedLength}, ancak Boyut {inputNDArray.size} olarak alındı");
                    return;
                }
            }
            catch (Exception ex)
            {
                Print("İstisna: " + ex.Message);
                Print("Yığın İzleme: " + ex.StackTrace);

                Exception innerException = ex.InnerException;
                while (innerException != null)
                {
                    Print("İç İstisna: " + innerException.Message);
                    Print("İç İstisna Yığın İzleme: " + innerException.StackTrace);
                    innerException = innerException.InnerException;
                }
            }
        }
    }
}

İşlem profili
0.0
Değerlendirmeler: 0
Müşteri değerlendirmeleri
Bu ürün için henüz bir değerlendirme yok. Ürünü denediniz mi? O zaman ona dair görüşlerini paylaşan ilk kişi olun!
AI
cTrader Store üzerinden erişilebilen işlem botları, göstergeler ve eklentiler gibi ürünler, üçüncü taraf sağlayıcılar tarafından sağlanır ve yalnızca bilgilendirme ve teknik erişim amaçlarıyla sunulur. cTrader Store bir broker değildir ve yatırım tavsiyesi, kişisel öneriler vermez veya gelecekteki performansı garanti etmez.

Bu oluşturanın diğer ürünleri

Gösterge
E7 Volume Profile, more modern look and feel.
Gösterge
Prop
E7 BBKG indicator with 80% plus accuracy used to show both, possible reversal and trend.
Gösterge
Polynomial Regression Channel which also reflects the volatility of the underlying asset.
Gösterge
E7 Harmonic Structures Basic.
Gösterge
E7 Correlation Dashboard.
Gösterge
Bollinger
Bollinger Band Cloud, Heiken Ashi, Trend Follower and Parabolic SAR.
Gösterge
Indices
Option pricing using the BlackScholes model and the Math.Numerics packages
Gösterge
Bollinger
ADXR, KDJ, SineWave, Bollinger Band Volatility and AEOscillator.

Şunları da beğenebilirsiniz

cBot
XAUUSD
Breakout
+2
Fractal breakout bot for XAUUSD. Auto lot sizing, trailing stop & daily profit target. Built for gold trading.
30.4%
ROI
3.83
Kâr faktörü
31.87%
Maks. değer kaybı
cBot
// XAU/USD 1H TIMEFRAME // 5 YEARS BACKTEST, PROFIT 200 USD, DRAWDOWN MAX 37 USD
cBot
AI
ATR
+9
Gold Predict AI – Advanced Predictive Trading for XAUUSD (M15)
cBot
ATR
RSI
+3
Intelligent system, Available any instrument. Profit 12. Drawdown 1%
cBot
AI
ATR
+5
Ai_ScalperPro Max is a sophisticated automated trading robot designed specifically for gold (XAUUSD) trading
100%
ROI
2.44
Kâr faktörü
25.93%
Maks. değer kaybı
cBot
Key Levels
SL Manager
+4
Multi-symbol dashboard with 3 fixed charts, dynamic position slots ranked by profit, Ratio analysis, MZ phase detection
cBot
ATR
No Overtrading
+3
Intelligent negotiations and analysis PRO!
21.2%
ROI
3
Kâr faktörü
2%
Maks. değer kaybı
cBot
Perfectly optimized to trade EURUSD achieving high risk reward. Win rate of over 85%
cBot
ATR
Auto-manages SL, TP, and position size to enforce risk discipline. Never enter a trade without a plan again.
cBot
Grid
Forex
+2
Resolver Algo Bot,Sophisticated, Perfect algorithm ! Daily ROI 5 to 24%.
cBot
AI
ATR
+5
No guessing — just confirmed breakouts, smart risk management, and disciplined execution. Less noise. More direction.
28.5%
ROI
4.44
Kâr faktörü
10.41%
Maks. değer kaybı
cBot
AI
ATR
+5
UltimateAI Trading Robot – Smart Trend & Momentum Trader for cTrader
60.1%
ROI
1.37
Kâr faktörü
39.8%
Maks. değer kaybı
cBot
Channel
SL Manager
+4
cTrader to Telegram trade notifier with custom message formats, risk alerts, and an on-chart dashboard.
cBot
AI
ATR
+26
Review and User Guide: PROP Account Guardian Pro cBot 🛡️
cBot
ADX
ATR
+4
Trend-following bot using Ichimoku, ADX and ATR; trades strong trends with strict risk filters.
1.51
Kâr faktörü
39.61%
Maks. değer kaybı
cBot
Prop
Forex
+11
Risk On Trade Lite | Auto Position Size Calculator for cTrader | Risk & Reward Tool | Auto Lot Size Calculator
cBot
RSI
Aggressive
automates entries based on the RSX indicator — a smoothed, low-lag variant of the classic RSI.
1.67
Kâr faktörü
10.25%
Maks. değer kaybı
cBot
Fixed Risk %
Risk/Reward
+3
Total passive trading control. One click Stop Loss and Take Profit. Breakeven and Goal line. Set it. Protect it. Profit.
Başlangıç 18/12/2024
2
Satışlar
4.1K
Ücretsiz yüklemeler