Trading product for E7 BBKG NumSharp Sample cBot AI, image 1
cBot
243 downloads
Version 1.0, Feb 2025
Windows, Mac, Mobile, Web
Trading product for E7 BBKG NumSharp Sample cBot AI, image 2
Seit 18/12/2024
2
Verkäufe
4.17K
Kostenlose Installationen

Wie von vielen von Ihnen gewünscht, arbeiten wir nun intensiv daran, Beispiele für einige unserer Machine-Learning-Codes und -Pakete bereitzustellen.

TensorFlow, PyTorch, Keras, Numpy, Pandas und viele weitere .NET-Pakete, um in cTrader loszulegen.

Unsere Mission ist es, Machine Learning in cTrader für alle einfacher zu machen.

Viel Erfolg bei der Suche!

*** Dieser Code handelt nichts (er gibt nur Daten usw. aus). Es ist einfach Beispielcode, wie Sie mit unseren Machine-Learning-Paketen eigene KI-Modelle erstellen können.

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

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("Quelle")]
        public DataSeries Source { get; set; }

        [Parameter("Benötigte Balken", DefaultValue = 50, MinValue = 1, MaxValue = 10000, Step = 1)]
        public int BarsRequired { get; set; }

        [Parameter("Methodenname", DefaultValue = MethodName.DataSplitPrints)]
        public MethodName Mode { get; set; }
        public enum MethodName
        {
            DataSplitPrints,
            PandasPrints,
            NDArrayPrints
        }
        
        protected override void OnStart()
        {
            // Initialisiere alle Indikatoren
        }

        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($"Fehler: {ex.Message}");
                if (ex.InnerException != null)
                {
                    Print($"Innere Ausnahme: {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 Datenaufteilung Ausgaben
        public void DataSplitPrints()
        {
            // Formatiere Eingabedaten um, damit sie der erwarteten Eingabeform des Modells entsprechen
            //var inputShape = new Shape(-1, BarsRequired, 5);
            NDArray inputData = np.array<float>(GetDataSet());
            Print("Eingabe NDarray: " + string.Join(", ", inputData));
            
            // Formatiere Ziel-Daten um, damit sie der vom Modell erwarteten Ziel-Form entsprechen
            //var targetShape = new Shape(-1, 5);
            NDArray targetData = np.array<float>(GetTargetDataSet());
            Print("Ziel NDarray: " + string.Join(", ", targetData));
            
            // Teile Daten in Trainings- und Testsets auf
            int testSize = (int)(0.2 * inputData.shape[0]); // 20% für Tests
            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 Daten: " + string.Join(", ", x_train));
            Print("X_test Daten: " + string.Join(", ", x_test));
            Print("Y_train Daten: " + string.Join(", ", y_train));
            Print("Y_test Daten: " + string.Join(", ", y_test));
        }
        
        /// PandasNet Ausgaben
        public void PandasPrints()
        {
            // Konvertiere float[,] zu List<Series>
            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()));
            }
            
            // Erstelle DataFrames
            DataFrame inputDataFrame = new DataFrame(inputSeriesList);
            DataFrame targetDataFrame = new DataFrame(targetSeriesList);
            
            Print("Eingabe DataFrame: " + inputDataFrame);
            Print("Ziel DataFrame: " + targetDataFrame);
            
            //Print("Eingabe DataFrame: " + string.Join(", ", inputDataFrame));
            //Print("Ziel DataFrame: " + string.Join(", ", targetDataFrame));
        }
        
        /// Einfache NumSharp NDArray-Ausgaben
        public void NDArrayPrints()
        {
            if (Bars.ClosePrices.Count < BarsRequired)
                return;

            try
            {
                // Aufruf Ihrer Eingabedaten float[,]
                float[,] inputData = GetDataSet();

                // Konvertiere zu NDArray und forme um zu (BarsRequired, 5)
                NDArray inputNDArray = np.array(inputData);   // NumSharp
                Print("Eingabe NumSharp NDarray Daten : " + string.Join(", ", inputNDArray));
                Print("Eingabe NumSharp NDarray Form: " + string.Join(", ", inputNDArray.shape));
                
                int erwarteteLänge = BarsRequired * 5;
                Print($"Erwartete NumSharp NDarray Länge: {erwarteteLänge}");
                Print($"Eingabe NumSharp NDarray Größe: {inputNDArray.size}");

                if (inputNDArray.size != erwarteteLänge)
                {
                    Print($"Längenabweichung: Erwartete Länge {erwarteteLänge}, aber Größe {inputNDArray.size} erhalten");
                    return;
                }
            }
            catch (Exception ex)
            {
                Print("Ausnahme: " + ex.Message);
                Print("StackTrace: " + ex.StackTrace);

                Exception innerException = ex.InnerException;
                while (innerException != null)
                {
                    Print("Innere Ausnahme: " + innerException.Message);
                    Print("StackTrace der inneren Ausnahme: " + innerException.StackTrace);
                    innerException = innerException.InnerException;
                }
            }
        }
    }
}

Handelsprofil
0.0
Bewertungen: 0
Kundenbewertungen
Bisher gibt es keine Bewertungen für dieses Produkt. Haben Sie es schon ausprobiert? Dann können Sie die erste Person sein, die andere darüber informiert!
AI
Über den cTrader Store verfügbare Produkte, einschließlich Handelsbots, Indikatoren und Plugins, werden von externen Entwicklern bereitgestellt und nur zu Informations- und technischen Zugriffszwecken verfügbar gemacht. cTrader Store ist kein Broker und erbringt keine Anlageberatung, persönlichen Empfehlungen oder eine Garantie für zukünftige Performance.

Mehr von diesem Autor

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

Das könnte Sie auch noch interessieren

cBot
RSI
N.B.: Results with an initial invested capital of 100 euros.
cBot
This algo uses two Exponential Moving Averages (EMAs): EMA 21 (fast) → reacts quickly to price changes. EMA 34 and 21
cBot
ATR
SL Manager
+3
Este cBot está diseñado para operar rupturas de rango en BTCUSD con una logica simple
49.6%
Rendite
1.44
Gewinnfaktor
cBot
AI
ATR
+8
Supertrend RSI ADX is a trading system built for traders who demand precision, control, and steady performance.
cBot
Forex
Crypto
+6
Allows you to speed up chart annotation by letting you create drawing tools via Hot Keys.
cBot
AI
SMC
+18
cTrader Trade Copier - copies trades to other cTrader accounts
cBot
AI
ATR
+8
Breakout scalping with prop-firm grade equity control.
cBot
Conservative
Grid Recovery
Ziggy, an advanced algorithm designed to maximize efficiency and simplify profit control.
cBot
Forex
Scalping
Special H1-Version of UltimateScalper for EUR/GBP ... win rate 100% ... ROI 830%
cBot
Perfectly optimized to trade XAUUSD. Win rate of about 85 to 90%.
cBot
Volume
Balanced
+5
An automated utility featuring global drawdown control, basket trailing profit tracking, and custom session filters.
16.4%
Rendite
1.55
Gewinnfaktor
cBot
RSI
Signal
+3
## **Matrix Gold Resurrection - Professional XAUUSD Trading Algorithm** **🏆 Advanced Gold Trading Bot
cBot
XAU/USD SWING BOT
cBot
Grid
Forex
+9
This tool will help you spread your trades very quickly with a few clicks
cBot
Grid Recovery
UltraGrid PRO DEMO Portfolio Advanced Trend-Following Grid System
1003.9%
Rendite
1.22
Gewinnfaktor
cBot
RSI
MACD
+7
XAU Session Trend Sniper ⚡️Gold M1 scalper with smart trend filter, ATR SL/TP & session logic – no grid, no martingale
cBot
Perfectly optimized to trade AUDUSD. Over 85% win rate
Seit 18/12/2024
2
Verkäufe
4.17K
Kostenlose Installationen