present
Kaydolun ve ilk alışverişinizde $50 indirim kazanın
Trading product for E7 BBKG NumSharp Sample cBot AI, image 1
E7 BBKG NumSharp Sample
cBot
276 i̇ndirmeler
Sürüm 1.0, Feb 2025
Windows, Mac, Mobile, Web
Trading product for E7 BBKG NumSharp Sample cBot AI, image 2
Başlangıç 18/12/2024
2
Satışlar
4.36K
Ücretsiz yüklemeler

Açıklama

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;
                }
            }
        }
    }
}

Özet

YZ özeti
E7 BBKG NumSharp Sample is a cTrader robot providing sample code to demonstrate integration of machine learning libraries within the cTrader environment. It includes examples using .NET packages such as TensorFlow, PyTorch, Keras, NumSharp, and PandasNet. The robot does not execute trades but prints out processed data to illustrate how users can start building AI models for trading analysis.

Key functionalities include:
- Data extraction from market bars (open, high, low, close prices, and tick volumes) over a configurable number of bars.
- Conversion of this data into formats compatible with machine learning workflows, including NumSharp NDArrays and Pandas DataFrames.
- Methods to split data into training and testing sets, and to print these datasets for inspection.
- Three operational modes selectable via parameters: DataSplitPrints, PandasPrints, and NDArrayPrints, each demonstrating different data handling approaches.

This sample code aims to facilitate machine learning development inside cTrader by providing foundational examples of data preparation and manipulation using popular ML libraries in a .NET context.
İşlem profili

Müşteri değerlendirmeleri

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!

Tartışma

SSS

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.
"E7 BBKG Indicator" logosu
En yüksek puanlı
4.5
(4)
$25
/
$50
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
ATR
EMA
+5
We transform trading concepts into fully automated cTrader systems with clearly defined entry, exit, risk-management
1.21
Kâr faktörü
cBot
Forex
XAUUSD
ALPHA Number One Trial Day 15
cBot
RSI
Indices
SALE OFF!!! this innovative bot combines the precision of Fibonacci Retracement, EMA and RSI...
cBot
AI
ATR
+8
ORB Smart Money Bot for XAUUSD is a sophisticated algorithmic trading system specifically optimized for Gold (XAUUSD).
cBot
AI
ATR
+27
Depth of Market + VIX Bot - Complete Analysis
cBot
AI Trading
AI Integration
Export cTrader market data to CSV or JSON for Python, AI, backtesting and quantitative research.
cBot
Forex
Automate Fibonacci trading with this cTrader cBot—advanced risk management, alerts, and seamless order execution.
cBot
ATR
RSI
+5
Professional Multi-Strategy Grid Trading Bot
cBot
ATR
Indices
+1
This cBot trades and profits from small reversions while managing risk through systematic position scaling.
cBot
Forex
EURUSD
+1
EURUSD M2 FREE BACKTEST UNTIL 16.01.2025 # 24% PER MONTH
cBot
Prop
Forex
+9
Forex Wizard
cBot
ATR
RSI
+17
The Swiss Army Knife cBot is a multi-tool trading robot that combines 10 of the most popular technical indicators
cBot
AI
XAUUSD
+4
Gold Pulse Pro – An automated trading system for gold (XAUUSD) precisely engineered and powered by advanced algorithms
cBot
Forex
Scalping
Special H1-Version of UltimateScalper for EUR/GBP ... win rate 100% ... ROI 830%
cBot
ATR
Forex
+2
Auto-Breakeven Bot w/ ATR & dual triggers. Works 100% with Risk Reward Guardian. Was Free for early users now -80%
cBot
Forex
BTCUSD
+11
CandlePatternBot — Trade classic candlestick signals with bull/bear bias and SL/TP or next-pattern exits.
cBot
MACD
Signal
+3
Dominate gold markets with Supertrend Gold – Backtested with +962% ROI!
cBot
SL Manager
Break Even
+4
FRACTAL STOP LOSS BOT AND RISK MANAGER

Fiyat

Başlangıç 18/12/2024
2
Satışlar
4.36K
Ücretsiz yüklemeler